Skip to content

Doesn't work well with Yarn #97

Open
@mattzuba

Description

@mattzuba

I see some previous commits and changes to make it work with Yarn, but it doesn't work for me on Win10CU. I modified some code in run-task.js and now it runs like a champ. I'm sure this entire if/else can be condensed a little bit.

        if (path.extname(options.npmPath || "a.js") === ".js") {
            const npmPath = options.npmPath || process.env.npm_execpath  //eslint-disable-line no-process-env
            const execPath = npmPath ? npmPath : "npm"
            const spawnArgs = [].concat(
                ["run"],
                options.prefixOptions,
                parseArgs(task)
            )

            // Execute.
            cp = spawn(execPath, spawnArgs, spawnOptions)
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions