Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Fix YarnInstaller skipping if installed
Browse files Browse the repository at this point in the history
Summary:
Set runtime environment to include the yarn install directory.

```
$HOME/.config/yarn/global/node_modules/.bin
```

Reviewed By: liuyinglao

Differential Revision: D33229270

fbshipit-source-id: 7f085685f414d33a36fea3dbe10b03ebdacbbb88
  • Loading branch information
raedle committed Dec 20, 2021
1 parent be1ba16 commit 2bf671b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchlive-cli/src/installers/YarnInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
getInstallerErrorMitigationMessage,
} from './IInstaller';
import {isCommandInstalled} from '../utils/ToolingUtils';
import {isMacOS} from '../utils/SystemUtils';
import {getEnv, isMacOS} from '../utils/SystemUtils';
import {TaskContext} from '../task/Task';
import yarn from '../commands/Yarn';

Expand All @@ -32,7 +32,7 @@ export default class YarnInstaller implements ICommandInstallerTask {
}

isInstalled(): boolean {
return isCommandInstalled('yarn');
return isCommandInstalled('yarn', getEnv());
}

mitigateOnError(): string {
Expand Down

0 comments on commit 2bf671b

Please sign in to comment.