Skip to content
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

The second command not getting executed in Windows #33

Closed
lance-shi opened this issue Mar 7, 2018 · 3 comments
Closed

The second command not getting executed in Windows #33

lance-shi opened this issue Mar 7, 2018 · 3 comments

Comments

@lance-shi
Copy link

I have tried the following code:

const cmd = require('node-cmd');

let directory = "C:\\Lance\\devhub\\UkWorkflow";
cmd.get(
    `cd ${directory}
    sfdx force:source:convert -d outputTmp/ --json`,
    function(err, data, stderr) {
        if(!err) {
        	console.log("data is: ");
            console.log(data);
        } else {
        	console.log("Error!");
            console.log(stderr);
        }
    }
);

It seems to me that second command - sfdx not getting executed at all. Any ideas about why this is happening?

@wplittle
Copy link

wplittle commented Mar 9, 2018 via email

@Kaushal28
Copy link

Same problem here.

@RIAEvangelist
Copy link
Owner

Its the space at the beginning.

     get(`
        cd
        dir
    `);

will fail on windows because it cares about the space from the start of the line to the first char.

on windws you have to do like this :

     get(`
cd
dir
    `);

I added a windows specific example to help clarify this for people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants