How to use fix-path - 1 common examples

To help you get started, we’ve selected a few fix-path examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JustinBeckwith / trebuchet / app / machines / appManager.js View on Github external
constructor() {
    super();
    
    // import OSX path variables so you can use gcloud
    fixPath();
    log.info("PATH: " + process.env.PATH);

    // getAppPath seems to be one ../ off when packaged vs dev. 
    this.resourcesPath = remote.app.getAppPath();
    fs.stat(path.join(this.resourcesPath, 'extras'), (err, stat) => {
      if (err) {
        this.resourcesPath = path.normalize(path.join(this.resourcesPath, '../'));
        log.info(`Resource path is ${this.resourcesPath}`);
      }
    });

    this.apps = null;
    this.getApps().then((apps) => {
      this.apps = apps;
    });

fix-path

Fix the $PATH on macOS and Linux when run from a GUI app

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Popular fix-path functions