mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Merge pull request #11762 from atom/dg-winbash-msys-cygwin-compatibility
Ensure atom command works on Cygwin + MSYS bash shells
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -12,3 +12,6 @@ spec/fixtures/css.css text eol=lf
|
||||
spec/fixtures/sample.js text eol=lf
|
||||
spec/fixtures/sample.less text eol=lf
|
||||
spec/fixtures/sample.txt text eol=lf
|
||||
|
||||
# Windows bash scripts are also Unix LF endings
|
||||
*.sh eol=lf
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/sh
|
||||
pushd "$(dirname "$0")" > /dev/null
|
||||
ATOMCMD=""$(pwd -W)"/atom.cmd"
|
||||
popd > /dev/null
|
||||
cmd.exe //c "$ATOMCMD" "$@"
|
||||
if command -v "cygpath" > /dev/null; then
|
||||
ATOMCMD=""$(cygpath "$(dirname "$0")" -a -w)\\atom.cmd""
|
||||
else
|
||||
pushd "$(dirname "$0")" > /dev/null
|
||||
ATOMCMD=""$(pwd -W)/atom.cmd""
|
||||
popd > /dev/null
|
||||
fi
|
||||
cmd.exe /C "$ATOMCMD" "$@"
|
||||
|
||||
Reference in New Issue
Block a user