Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"forego start" exits immediately with doing nothing on macOS #123

Open
ysmazda opened this issue Dec 10, 2019 · 2 comments
Open

"forego start" exits immediately with doing nothing on macOS #123

ysmazda opened this issue Dec 10, 2019 · 2 comments

Comments

@ysmazda
Copy link

ysmazda commented Dec 10, 2019

"forego start" exits immediately with doing nothing written in Procfile on macOS.

How to reproduce

GO111MODULE=off go get -u github.com/ddollar/forego
echo "echo: echo Hello" > Procfile.hello
forego start -f Procfile.hello
echo "touch: touch a.txt" > Procfile.touch
forego start -f Procfile.touch
ls a.txt

Expected behavior

Hello is output.
a.txt is created.

$ forego start -f Procfile.hello
forego | starting echo.1 on port 5000
echo.1 | Hello
$ forego start -f Procfile.touch
forego  | starting touch.1 on port 5000
$ ls a.txt
a.txt

Actual behavior

Hello is not output.
a.txt is not created.

$ forego start -f Procfile.hello
forego | starting echo.1 on port 5000
$ forego start -f Procfile.touch
forego  | starting touch.1 on port 5000
$ ls a.txt
ls: a.txt: No such file or directory

Platform info

$ go version
go version go1.13.4 darwin/amd64

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A602

$ uname -rsv
Darwin 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64

$ sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
@ysmazda
Copy link
Author

ysmazda commented Dec 10, 2019

This behavior was introduced by 51d9f6d, and I got the expected behavior by using the source of 4bb2132.

The cause of the behavior change seems to be the difference of source command between bash and sh where bash executes command after semicolon when the target file of source command does not exist but sh does not.

$ bash -c "source non-existent; echo hello"
bash: non-existent: No such file or directory
hello
$ sh -c "source non-existent; echo hello"
sh: non-existent: No such file or directory

@padde
Copy link

padde commented Aug 16, 2022

Same issue on alpine linux, solved for now by installing the last tagged version

go install github.com/ddollar/forego@20180216151118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants