Skip to content

Commit

Permalink
Fix batch file's shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
3846masa committed Feb 13, 2017
1 parent 21bcf14 commit 03d00bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (pm *PackageManager) Install(pkg *Package) error {
}

if runtime.GOOS == "windows" {
d = append([]byte(":: |\n @( whalebrew run %~f0 %* || exit /b %ERRORLEVEL% ) && exit /b 0\n"), d...)
d = append([]byte(":: |\r\n @( whalebrew run %~f0 %* ) & exit /b errorlevel\r\n"), d...)
d = bytes.Replace(d, []byte("\r\n"), []byte("\n"), -1)
d = bytes.Replace(d, []byte("\n"), []byte("\r\n"), -1)
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var shebang = "#!/usr/bin/env whalebrew\n"
func init() {
// for Windows
if runtime.GOOS == "windows" {
shebang = ":: |\r\n @( whalebrew run %~f0 %* || exit /b %ERRORLEVEL% ) && exit /b 0\r\n"
shebang = ":: |\r\n @( whalebrew run %~f0 %* ) & exit /b errorlevel\r\n"
}
}

Expand Down

0 comments on commit 03d00bf

Please sign in to comment.