Skip to content

Execute a file #211

@DmitryEfimenko

Description

@DmitryEfimenko

I have a .sh file to be executed. Is there a way to do that with shelljs?
Below does not work on Windows:

var scriptToRun = path.resolve('./', 'shells/', 'myScript.sh');
shell.exec(scriptToRun, { async: true })

myScript.sh

#!/bin/sh

VAR1="asd"
echo $VAR1

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