Skip to content

Commit def046a

Browse files
committed
Quote PWD environment variable
1 parent f7bf94d commit def046a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
- uses: actions/checkout@v2
2828
- run: yarn global add @bazel/bazelisk
2929
- run: bazel build //... --//semanticdb-javac:enabled=true
30-
- run: bazel run lsif-semanticdb:bazel -- --sourceroot $PWD
30+
- run: bazel run lsif-semanticdb:bazel -- --sourceroot "$PWD"
3131
- run: du -h dump.lsif-typed
3232
- run: bazel build //... --@lsif_java//semanticdb-javac:enabled=true
3333
working-directory: examples/bazel-example
34-
- run: bazel run @lsif_java//lsif-semanticdb:bazel -- --sourceroot $PWD
34+
- run: bazel run @lsif_java//lsif-semanticdb:bazel -- --sourceroot "$PWD"
3535
working-directory: examples/bazel-example
3636
- run: du -h dump.lsif-typed
3737
working-directory: examples/bazel-example

lsif-semanticdb/src/main/java/com/sourcegraph/lsif_semanticdb/BazelOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class BazelOptions {
1616
public boolean parallel = false;
1717

1818
public static void printHelp() {
19-
System.out.println("bazel run //lsif-semanticdb:bazel -- [..options]");
19+
System.out.println("bazel run @lsif_java//lsif-semanticdb:bazel -- [..options]");
2020
System.out.println();
2121
System.out.println("Command-line tool to generate LSIF for Java targets in a Bazel build.");
2222
System.out.println(
@@ -27,7 +27,7 @@ public static void printHelp() {
2727
System.out.println(
2828
" --sourceroot <path> the absolute path to the root directory of the Bazel codebase");
2929
System.out.println(
30-
" TIP: use --sourceroot $PWD to pass the current working directory");
30+
" TIP: use --sourceroot \"$PWD\" to pass the current working directory");
3131
System.out.println(" --output <path> the absolute path to the file that should be generated");
3232
System.out.println(" --parallel whether to process files in parallel");
3333
System.out.println(
@@ -95,7 +95,7 @@ public static Optional<BazelOptions> parse(String[] args) throws IOException {
9595
if (options.sourceroot == null) {
9696
if (args.length == 0) {
9797
errors.add(
98-
"missing required flag --sourceroot <path>. To fix this problem, pass in the `--sourceroot` flag like this: bazel run @lsif_java//lsif-semanticdb:bazel -- --sourceroot $PWD");
98+
"missing required flag --sourceroot <path>. To fix this problem, pass in the `--sourceroot` flag like this: bazel run @lsif_java//lsif-semanticdb:bazel -- --sourceroot \"$PWD\"");
9999
} else {
100100
errors.add("missing required flag --sourceroot <path>");
101101
}

0 commit comments

Comments
 (0)