Skip to content

Commit 77070c9

Browse files
committed
fix: local identifier argument not being identified properly
1 parent 53d0c23 commit 77070c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/com/browserstack/automate/ci/jenkins/local/JenkinsBrowserStackLocal.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ private String[] processLocalArguments(final String argString, String buildTag)
6464
localIdentifier = args[i + 1];
6565
if (StringUtils.isNotBlank(localIdentifier)) {
6666
localIdentifierOverriden = true;
67-
continue;
6867
}
6968

7069
// skip next, since already processed
@@ -84,11 +83,14 @@ private String[] processLocalArguments(final String argString, String buildTag)
8483

8584
arguments.add(args[i]);
8685
}
86+
8787
if (!localIdentifierOverriden) {
8888
localIdentifier = UUID.randomUUID().toString() + "-" + buildTag.replaceAll("[^\\w\\-\\.]", "_");
89-
arguments.add(localIdPos, localIdentifier);
90-
arguments.add(localIdPos, "-" + OPTION_LOCAL_IDENTIFIER);
9189
}
90+
91+
arguments.add(localIdPos, localIdentifier);
92+
arguments.add(localIdPos, "-" + OPTION_LOCAL_IDENTIFIER);
93+
9294
return arguments.toArray(new String[]{});
9395
}
9496

0 commit comments

Comments
 (0)