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

Lifecycle script fails on Ubuntu #727

Closed
mrmurphy opened this issue Oct 11, 2016 · 2 comments · Fixed by #809
Closed

Lifecycle script fails on Ubuntu #727

mrmurphy opened this issue Oct 11, 2016 · 2 comments · Fixed by #809

Comments

@mrmurphy
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
running a lifecycle script on Ubuntu fails while running on macOS works.

If the current behavior is a bug, please provide the steps to reproduce.

  • add "foo": "ls -la" to your package.json
  • execute yarn run foo

You should see output like this: sh: 1: ls -la: not found

What is the expected behavior?
The expected behavior, and the behavior you would see on macOS is that "ls -la" would be executed, and the output would be printed to the terminal.

Please mention your node.js, yarn and operating system version.
OS: Ubuntu 14.04.4 LTS
Node: v4.2.6
Yarn: 0.15.1

@Daniel15
Copy link
Member

Daniel15 commented Oct 11, 2016

Hmm, I can't repro on Debian

14:10 daniel@dan /tmp/npm1
% cat package.json
{
  "name": "npm1",
  "version": "1.0.0",
  "scripts": {
    "foo": "ls -la"
  }
}

14:10 daniel@dan /tmp/npm1
% /usr/local/src/yarn/bin/yarn run foo
yarn run v0.15.0
$ ls -la
total 20
drwxr-xr-x  2 daniel daniel  4096 Oct 11 14:10 .
drwxrwxrwt 38 root   root   12288 Oct 11 14:10 ..
-rw-r--r--  1 daniel daniel    83 Oct 11 14:10 package.json
Done in 0.30s.

I wonder if Ubuntu does something weirdly

Does npm run foo work?

@Daniel15
Copy link
Member

Looks like a duplicate of #735. I'm going to merge the two issues. Thanks for reporting this!

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

Successfully merging a pull request may close this issue.

2 participants