Skip to content

Commit 26fcb03

Browse files
committed
Optimize bash Windows, force LF line endings
1 parent 0e5a4ff commit 26fcb03

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ spec/fixtures/css.css text eol=lf
1212
spec/fixtures/sample.js text eol=lf
1313
spec/fixtures/sample.less text eol=lf
1414
spec/fixtures/sample.txt text eol=lf
15+
16+
# Windows bash scripts are also Unix LF endings
17+
*.sh eol=lf

resources/win/atom.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
2-
pushd "$(dirname "$0")" > /dev/null
32
if command -v "cygpath" > /dev/null; then
4-
ATOMCMD=""$(cygpath . -a -w)atom.cmd""
3+
ATOMCMD=""$(cygpath "$(dirname "$0")" -a -w)\\atom.cmd""
54
else
5+
pushd "$(dirname "$0")" > /dev/null
66
ATOMCMD=""$(pwd -W)/atom.cmd""
7+
popd > /dev/null
78
fi
8-
popd > /dev/null
9-
cmd.exe //c "$ATOMCMD" "$@"
9+
cmd.exe /C "$ATOMCMD" "$@"

0 commit comments

Comments
 (0)