Skip to content

Commit

Permalink
fix: check RUNFILES env variable in @bazel/runfiles helper
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Nov 23, 2022
1 parent 591e76e commit 0b599d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/runfiles/runfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ export class Runfiles {
this.manifest = this.loadRunfilesManifest(_env['RUNFILES_MANIFEST_FILE']!);
} else if (!!_env['RUNFILES_DIR']) {
this.runfilesDir = path.resolve(_env['RUNFILES_DIR']!);
} else if (!!_env['RUNFILES']) {
this.runfilesDir = path.resolve(_env['RUNFILES']!);
} else {
throw new Error(
'Every node program run under Bazel must have a $RUNFILES_DIR or $RUNFILES_MANIFEST_FILE environment variable');
'Every node program run under Bazel must have a $RUNFILES_DIR, $RUNFILES or $RUNFILES_MANIFEST_FILE environment variable');
}
// Under --noenable_runfiles (in particular on Windows)
// Bazel sets RUNFILES_MANIFEST_ONLY=1.
Expand Down

0 comments on commit 0b599d1

Please sign in to comment.