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

$readlink always throws error #717

Closed
freewind opened this issue Jan 24, 2024 · 2 comments
Closed

$readlink always throws error #717

freewind opened this issue Jan 24, 2024 · 2 comments

Comments

@freewind
Copy link

freewind commented Jan 24, 2024

Expected Behavior

No error and show the same result as we type it on command line

Actual Behavior

Always throw error, even if it's working on comand line

Steps to Reproduce the Problem

  1. echo "$`readlink .`" > check.mjs; chmod +x ./check.mjs
  2. zx check.mjs

It prints error like:

~ ❯ zx ./check.mjs
$ readlink /Users/me/test
file:///Users/me/.local/lib/node_modules/zx/build/core.js:146
            let output = new ProcessOutput(code, signal, stdout, stderr, combined, message);
                         ^

ProcessOutput [Error]:
    at file:///Users/me/check.mjs:2:2
    exit code: 1
    at ChildProcess.<anonymous> (file:///Users/me/.local/lib/node_modules/zx/build/core.js:146:26)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess.emit (node:domain:488:12)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:514:28)
    at Socket.emit (node:domain:488:12)
    at Pipe.<anonymous> (node:net:337:12)
    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
  _code: 1,
  _signal: null,
  _stdout: '',
  _stderr: '',
  _combined: ''
}

Node.js v20.10.0
~ ❯

Specifications

  • Version: 7.2.3
  • Platform: mac os 12.6.2
@freewind
Copy link
Author

Switch to shelljs now :(

@antonmedv
Copy link
Collaborator

Switch to shelljs now :(

awesome. So this issue not longer relevant

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