Skip to content

Instantly share code, notes, and snippets.

@pogilvie
Created March 30, 2019 20:16
Show Gist options
  • Save pogilvie/302739a0402d0e84adb9d58cccc9a246 to your computer and use it in GitHub Desktop.
Save pogilvie/302739a0402d0e84adb9d58cccc9a246 to your computer and use it in GitHub Desktop.
node/sfdx script
const
    child_process = require('child_process'); 
    
const
    dx = child_process.spawnSync (
        'sfdx',                                                 // command
        [ 'force:schema:sobject:describe', '-s Account'],       // arguments
        {   cwd: process.cwd(),                                 // options
            env: process.env,
            stdio: 'pipe', 
            encoding: 'utf-8'
        }
    );

console.log(dx);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment