Comments (14)
does that happen regardless of setting the flag {async:true}
?
from shelljs.
@arturadib any progress regarding this ;)
from shelljs.
Cause stall for this snippet in Windows PowerShell xD
https://github.com/axisthemes/grunt-potomo/blob/master/tasks/potomo.js#L53-L60
Ref: WP-Translations/grunt-transifex-wordpress#9 (comment)
from shelljs.
we recently changed the exec command to use Node's latest execSync
.. can you please try the latest version from npm? (0.4.0) thanks
from shelljs.
The latest update may fix this issue, don't know yet because now there is a new error. I'm guessing it has to due with space characters in the path name. Please see the attached screenshot. Notice the very first error, the path name is truncated at the first space in the path name.
I think there might be an issue with spaces in the path name in po
Ref: WP-Translations/grunt-transifex-wordpress#9 (comment)
from shelljs.
Oh, it works fine when run from cmd.exe.
from shelljs.
@devtristan I know you've been looking for Windows bugs to solve, this may be a good one! :)
from shelljs.
Ok, I did two tests...
- I move my project to a path which did not contain spaces in the path name. I got the exact same error message when using powershell; cmd worked fine.
- I created a new admin user on my Win8.1 machine and logged into it. This new user did not have a space in its name. I opened powershell and navigated to the project that i created for
1.
and it worked.
So the issue definitely has to do with the space in the file path but not the path in relation to the actual project. I suspect it has something to do with the file that shelljs writes to the users temp folder.
from shelljs.
Ok, I tracked it down to the _tempDir() function.
I changed this:
state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+
writeableDir(process.env['TMPDIR']) ||
writeableDir(process.env['TEMP']) ||
writeableDir(process.env['TMP']) ||
writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS
writeableDir('C:\\TEMP') || // Windows
writeableDir('C:\\TMP') || // Windows
writeableDir('\\TEMP') || // Windows
writeableDir('\\TMP') || // Windows
writeableDir('/tmp') ||
writeableDir('/var/tmp') ||
writeableDir('/usr/tmp') ||
writeableDir('.'); // last resort
To this:
state.tempDir = writeableDir('C:\\TEMP') || // Windows
writeableDir('C:\\TMP') || // Windows
writeableDir('\\TEMP') || // Windows
writeableDir('\\TMP') || // Windows
writeableDir('.'); // last resort
And it worked from powershell. The temp file ended up being written to the project folder instead of the temp folder in c:\TEMP
.
What the solution is from here, I do not know... but hopefully this helps!
from shelljs.
Any news on this? Experiencing the same (see below) with shelljs 0.5.3.
Error: Command failed: "c:\Program Files\nodejs\node.exe" c:\Users\Arve Seljebu\AppData\Local\Temp\shelljs_5f1db58f6af48df8b8a5
at checkExecSyncError (child_process.js:464:13)
at Object.execSync (child_process.js:504:13)
at execSync (c:\Users\Arve Seljebu\Documents\GitHub\lesson_editor\node_modules\shelljs\src\exec.js:81:11)
at _exec (c:\Users\Arve Seljebu\Documents\GitHub\lesson_editor\node_modules\shelljs\src\exec.js:214:12)
at c:\Users\Arve Seljebu\Documents\GitHub\lesson_editor\node_modules\shelljs\src\common.js:182:23
at Object.<anonymous> (c:\Users\Arve Seljebu\Documents\GitHub\lesson_editor\ghpages.js:13:1)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
from shelljs.
@ariporad Why remove the bug label? Is breaking on usersnames with spaces intended behavior?
I see you write
- I'm going to setup some better labels, is that OK?
in #272. What is a better label?
from shelljs.
I think he just removed all the old labels. I think the label we're using for bugs is "fix" (although I personally liked the "bug" label better). I suppose if we think of "fix" as meaning "please fix this" for github issues and "fix" as meaning "this is a fix" for pull requests, then it all makes sense.
from shelljs.
@arve0, @nfischer: Yeah, that's exactly right. I have a script which nukes all the existing labels and creates new ones.
@nfischer: The reason for fix
is that at the time we were planning to use the commit message guidelines, so I created a label for each commit message type (chore
/fix
/test
/feat
/etc.).
from shelljs.
Yup, I figured that was the other reason.
Back to the issue at hand, I think we agree that this is in fact an issue, and I've applied the label. I'll try testing out #263 and see if this is in fact an issue and if that fixes the concern.
from shelljs.
Related Issues (20)
- Feature request (true, false) HOT 1
- test-with-coverage is broken on node v16 HOT 1
- `cd.js` swallows the initial error HOT 1
- "TypeError: common.register is not a function" under node v20.6.0 HOT 13
- GitHub actions dropping support for node < 16
- Exec failure on Node 21 HOT 1
- In mv command, there should be en error if destination directory not present. HOT 1
- shell.exec(`mv a/m.js b/`) cannot return error stdout HOT 2
- Latest shelljs type definitions have errors HOT 4
- Vulnerability in shelljs dependency: CWE-772: Missing Release of Resource after Effective Lifetime HOT 4
- shelljs.exec or child_process.exec not executing HOT 2
- Shelljs EXEC does not work when running a pre-compiled binary application HOT 4
- Attempted to import the Node standard library module "fs" HOT 1
- A problem with cd outside the project HOT 3
- `exec-child.js` module not found, when running `shell.exec()` on Next.js Server Actions
- Dynamic require() without .js extension breaks bundling (esbuild)
- Please update dependency HOT 1
- package.json version is outdated HOT 3
- Security findings - transitive dependency `inflight` is deprecated HOT 1
- unable to package into binary or minify shelljs 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 shelljs.