Comments (4)
Good, now I just need #45 done.
from zx.
This is a bit odd since I am apparently failing to reproduce this bug. Here's what I did:
- Open Git Bash (assumed to be your setup since you have that big MINGW64)
- Go to where
zx
is - Go to the "examples" folder because I am too lazy to create one
- Save the script as
test.mjs
(bad name, I know) - Run
node ../zx.mjs file:///c:/Users/art/GH/zx/examples/test.mjs
art@REDACTED MINGW64 ~/GH/zx/examples (wind)
$ node ../zx.mjs file:///c:/Users/art/GH/zx/examples/test.mjs
$ cat ../package.json | grep name | cut -d":" -f 2 | cut -d',' -f1
"zx"
ProcessOutput {}
It could be that one of the updates fixed the issue, since a lot of commits changes came through in the last two days. Try updating zx
first. (I don't really have an explanation of what could've caused it in the first place, let alone what fixed it.)
from zx.
I update zx from v1.1.1
to v 1.2.2
. Invalid and a new problem occurred
cmd
F:\codeTest\jsToSh\src>zx file:///F:/codeTest/jsToSh/src/index.mjs
'command' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
'which' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
ϵͳ�Ҳ���ָ�����ļ�
����: -p ʱ���
ϵͳ�Ҳ���ָ�����ļ�
����: bash ʱ���
child_process.js:616
err = new Error(msg);
^
Error: Command failed: command -v bash || which bash || type -p bash
'command' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
'which' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
ϵͳ�Ҳ���ָ�����ļ���
����: -p ʱ������
ϵͳ�Ҳ���ָ�����ļ���
����: bash ʱ������
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/zx/index.mjs:75:14
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
status: 1,
signal: null,
output: [
null,
Buffer(0) [Uint8Array] [],
Buffer(218) [Uint8Array] [
39, 99, 111, 109, 109, 97, 110, 100, 39, 32, 178, 187,
202, 199, 196, 218, 178, 191, 187, 242, 205, 226, 178, 191,
195, 252, 193, 238, 163, 172, 210, 178, 178, 187, 202, 199,
191, 201, 212, 203, 208, 208, 181, 196, 179, 204, 208, 242,
13, 10, 187, 242, 197, 250, 180, 166, 192, 237, 206, 196,
188, 254, 161, 163, 13, 10, 39, 119, 104, 105, 99, 104,
39, 32, 178, 187, 202, 199, 196, 218, 178, 191, 187, 242,
205, 226, 178, 191, 195, 252, 193, 238, 163, 172, 210, 178,
178, 187, 202, 199,
... 118 more items
]
],
pid: 13356,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(218) [Uint8Array] [
39, 99, 111, 109, 109, 97, 110, 100, 39, 32, 178, 187,
202, 199, 196, 218, 178, 191, 187, 242, 205, 226, 178, 191,
195, 252, 193, 238, 163, 172, 210, 178, 178, 187, 202, 199,
191, 201, 212, 203, 208, 208, 181, 196, 179, 204, 208, 242,
13, 10, 187, 242, 197, 250, 180, 166, 192, 237, 206, 196,
188, 254, 161, 163, 13, 10, 39, 119, 104, 105, 99, 104,
39, 32, 178, 187, 202, 199, 196, 218, 178, 191, 187, 242,
205, 226, 178, 191, 195, 252, 193, 238, 163, 172, 210, 178,
178, 187, 202, 199,
... 118 more items
]
}
F:\codeTest\jsToSh\src>
powerShell
PS F:\codeTest\jsToSh\src> zx file:///F:/codeTest/jsToSh/src/index.mjs
'command' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
'which' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
ϵͳ�Ҳ���ָ�����ļ�
����: -p ʱ���
ϵͳ�Ҳ���ָ�����ļ�
����: bash ʱ���
child_process.js:616
err = new Error(msg);
^
Error: Command failed: command -v bash || which bash || type -p bash
'command' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
'which' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
ϵͳ�Ҳ���ָ�����ļ���
����: -p ʱ������
ϵͳ�Ҳ���ָ�����ļ���
����: bash ʱ������
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/zx/index.mjs:75:14
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
status: 1,
signal: null,
output: [
null,
Buffer(0) [Uint8Array] [],
Buffer(218) [Uint8Array] [
39, 99, 111, 109, 109, 97, 110, 100, 39, 32, 178, 187,
202, 199, 196, 218, 178, 191, 187, 242, 205, 226, 178, 191,
195, 252, 193, 238, 163, 172, 210, 178, 178, 187, 202, 199,
191, 201, 212, 203, 208, 208, 181, 196, 179, 204, 208, 242,
13, 10, 187, 242, 197, 250, 180, 166, 192, 237, 206, 196,
188, 254, 161, 163, 13, 10, 39, 119, 104, 105, 99, 104,
39, 32, 178, 187, 202, 199, 196, 218, 178, 191, 187, 242,
205, 226, 178, 191, 195, 252, 193, 238, 163, 172, 210, 178,
178, 187, 202, 199,
... 118 more items
]
],
pid: 12040,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(218) [Uint8Array] [
39, 99, 111, 109, 109, 97, 110, 100, 39, 32, 178, 187,
202, 199, 196, 218, 178, 191, 187, 242, 205, 226, 178, 191,
195, 252, 193, 238, 163, 172, 210, 178, 178, 187, 202, 199,
191, 201, 212, 203, 208, 208, 181, 196, 179, 204, 208, 242,
13, 10, 187, 242, 197, 250, 180, 166, 192, 237, 206, 196,
188, 254, 161, 163, 13, 10, 39, 119, 104, 105, 99, 104,
39, 32, 178, 187, 202, 199, 196, 218, 178, 191, 187, 242,
205, 226, 178, 191, 195, 252, 193, 238, 163, 172, 210, 178,
178, 187, 202, 199,
... 118 more items
]
}
PS F:\codeTest\jsToSh\src>
git Bash
Administrator@WIN-JH5VDQS6BP7 MINGW64 /f/codeTest/jsToSh/src
$ zx file:///F:/codeTest/jsToSh/src/index.mjs
'command' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
$ cat ../package.json | grep name | cut -d":" -f 2 | cut -d',' -f1
Administrator@WIN-JH5VDQS6BP7 MINGW64 /f/codeTest/jsToSh/src
$
from zx.
I just need to wait
from zx.
Related Issues (20)
- ssh() fails: "Control socket connect" HOT 1
- Shell variable in args array not expanded HOT 2
- Feature request: Process Promise verbose() HOT 1
- Self-introduction: GitHub Action `run-zx`
- Reduce package installation size HOT 3
- Feature request: nothrow() only for a subset of error codes
- Allow multiple lines of hashbangs
- $`readlink` always throws error HOT 2
- An easy way to specify stdin HOT 3
- Replacing globby with a lighter alternative HOT 3
- Problem with Nested double quote and single quote command
- Windows: Create process not expected to return HOT 4
- feat request: provide formatters shortcuts
- feat req: provide `signal` opt
- Setting stdio/err to inherit throws error HOT 1
- Typo in 8.0 release description HOT 1
- Feature request: automatically add a newline after commands that don't end their output with one HOT 2
- The type for `glob` is `any` after 8.0.0 HOT 5
- Port listening doesn't stop when using `CTRL+C` HOT 11
- Feature request: add `usePwsh` helper for PowerShell 7+ HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zx.