Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Issue while running scripty on windows10 #92

@vsawant1608

Description

@vsawant1608

I have below package.json file

{
  "name": "scripty-issue",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "node app.js",
    "foo": "scripty"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "cross-spawn": "^7.0.3",
    "express": "^4.17.1"
  },
  "devDependencies": {
    "scripty": "^2.0.0"
  },
  "scripty": {
    "logLevel": "verbose"
  }
}

and below is '/scripts/foo.sh'

echo "Hello";

When I run
npm run foo getting below error on windows.

internal/child_process.js:366
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at spawn (child_process.js:551:9)
    at module.exports (D:\Explore\scripty-issue\node_modules\scripty\lib\run\spawn-script.js:8:17)
    at cb (D:\Explore\scripty-issue\node_modules\scripty\lib\run\index.js:4:27)
    at D:\Explore\scripty-issue\node_modules\async\dist\async.js:3880:24
    at replenish (D:\Explore\scripty-issue\node_modules\async\dist\async.js:1011:17)
    at D:\Explore\scripty-issue\node_modules\async\dist\async.js:1016:9
    at eachOfLimit (D:\Explore\scripty-issue\node_modules\async\dist\async.js:1041:24)
    at D:\Explore\scripty-issue\node_modules\async\dist\async.js:1046:16
    at _parallel (D:\Explore\scripty-issue\node_modules\async\dist\async.js:3879:5)

Just works fine on ubuntu. Any pointers would be helpful. I tried passing {shell:true} in node_modules\scripty\lib\run\spawn-script.js:8:17 and it just worked fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions