Skip to content

Commit

Permalink
WSL2 の対策を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
smzht committed Oct 27, 2020
1 parent 947c408 commit e311996
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sglstart
Expand Up @@ -38,7 +38,9 @@ if [ -e "$1" ]; then
file_name=$(basename -- "$target_path")

# ウィンドウのタイトルにファイル名の文字列を含むものがあればポップアップする
if winactivate.exe "$file_name" 2> /dev/null; then
# (WSL2 では、UNC パスをマウントしているマウントポイント配下がカレントディレクトリの状態で
# Windows の exe コマンドを実行するとエラー終了する。この対策のため、事前に cd を行う。)
if (cd; winactivate.exe "$file_name" 2> /dev/null); then
exit 0
fi
fi
Expand Down

0 comments on commit e311996

Please sign in to comment.