-
Notifications
You must be signed in to change notification settings - Fork 60
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
Congratulations and question about Windows cmd #89
Comments
Try to use
const Seven = require('node-7z')
const sevenBin = require('7zip-bin')
const pathTo7zip = sevenBin.path7za
function tryMe() {
const compress = Seven.add("myfolder", "myfolder", {
$bin: pathTo7zip
})
} |
Thanks ! The package works by spawning an actual 7zip command based on your input, the parse the output (stdout) and send the appropriate JS events. So what you see is "normal" Unfortunatly I'm a little bit unclear on the implementation of the Spawn command on Windows (linux user here 😁) and I don't know why it's not happening in the background by default. I will run more tests in the next few weeks. |
If you don't need the process to be detached you can do: function tryMe() {
const compress = Seven.add("myfolder", "myfolder", { $spawnOptions: { detached: false } } )
} An alternative is the function tryMe() {
const compress = Seven.add("myfolder", "myfolder", { $spawnOptions: { windowsHide: true } } )
} |
Note to myself : consider adding |
BREAKING CHANGE: Drop cross-spawn in favor of Node.js spawn
Fixed on the next release |
Using your amazing pkg on Windows 10 with the below code is opening my cmd, why?
The text was updated successfully, but these errors were encountered: