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

'make deploy' adds lines to TARGET file prefixed by '-e' #66

Closed
whereisaaron opened this issue Jul 6, 2019 · 4 comments
Closed

'make deploy' adds lines to TARGET file prefixed by '-e' #66

whereisaaron opened this issue Jul 6, 2019 · 4 comments

Comments

@whereisaaron
Copy link

The Makefile includes some echo -e commands to add to the target file. The -e seems to work and the backslashes get interpreted, but also the '-e' is turning up in the output added to the file. Can't explain that. Any idea?

-e # Makefile on Sat Jul  6 13:04:24 DST 2019
STACK_ID=arn:aws:cloudformation:...
-e # Makefile on Sat Jul  6 13:04:26 DST 2019
LAMBDA_NAME=aws-to-slack-ABCDEFGIJK

echo is working as you'd expect on the command line.

$ echo "Foo\nBar"
Foo\nBar
$ echo -e "Foo\nBar"
Foo
Bar
GNU Make 4.1
GNU bash, version 4.4.19(1)-release
@homeyjd
Copy link
Collaborator

homeyjd commented Jul 6, 2019

I'm on GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18), but bash's inconsistencies might as well be legendary...

Removed the -e here: 8c0bd92. Does this work on your version?

@whereisaaron
Copy link
Author

Thanks @homeyjd, considering there are more that 10 years of development between your version of bash and my version, I wouldn't be surprised!

However, I don't think bash is the issue here, rather I think the commands in the Makefile are being run with pure sh and its echo does not have the -e option.

$ echo -e Hello
Hello
$ sh
$ echo -e Hello
-e Hello

Your make may be using bash instead of sh. Either way your patch should make it safe!

BTW MacOS is stuck on 3.2 because Apple apparently still thinks open source is evil, but you can actually upgrade to a modern version of bash on MacOS with Homebrew.

Mavericks ships with bash 3.2. That’s from 2006. The current version is 4.2.10. Why no upgrade? Because Apple’s shipping the last version of bash that was under the GPL version 2.

@homeyjd
Copy link
Collaborator

homeyjd commented Jul 8, 2019

Thanks for sharing the context @whereisaaron :)

@homeyjd homeyjd closed this as completed Jul 8, 2019
@whereisaaron
Copy link
Author

Thanks for putting this project together @homeyjd! I like the parser list with both the select and parse passes. It is the exact same approach as another (unrelated) project I've work on for ~13 years and it really worked as a clean model through many changes over the years.

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