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

fix(wapm) Fix the wax script generation #2426

Merged
merged 2 commits into from
Jun 17, 2021

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Jun 17, 2021

Description

On macOS, echo always enables interpretation of backslach sequences
(like \n). On Linux, the -e flag must be used. Even if this -e
flag is absent from the macOS man's page for echo(1), it is accepted
and ignored, thus we can safely use it in our Makefile.

To test this patch:

$ # before
$ make package-wapm
$ cat package/bin/wax
#!/bin/bash\nwapm execute "$@"
$
$ # after
$ make package-wapm
$ cat package/bin/wax
#!/bin/bash
wapm execute "$@"

This patch fixes #2425.

Review

  • Add a short description of the change to the CHANGELOG.md file

On macOS, `echo` always enables interpretation of backslach sequences
(like `\n`). On Linux, the `-e` flag must be used. Even if this `-e`
flag is absent from the macOS man's page for `echo(1)`, it is accepted
and ignored, thus we can safely use it in our `Makefile`.

To test this patch:

```sh
$ # before
$ make package-wapm
$ cat package/bin/wax
$
$ # after
$ make package-wapm
$ cat package/bin/wax
wapm execute "$@"
```
@Hywan Hywan added bug Something isn't working 📦 lib-cli About wasmer-cli labels Jun 17, 2021
@Hywan Hywan self-assigned this Jun 17, 2021
@Hywan Hywan force-pushed the fix-wax-bin-file-generation branch from 15052bb to 76a856d Compare June 17, 2021 09:14
@syrusakbary
Copy link
Member

Awesome! Merging manually

@syrusakbary syrusakbary merged commit e315431 into wasmerio:master Jun 17, 2021
@syrusakbary syrusakbary added this to the v2.1 milestone Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-cli About wasmer-cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasmer 2.0.0: Invalid syntax in wax
2 participants