Skip to content

Commit

Permalink
[MINVOKER-289] - Support for shared invoker's Update-Snapshots Flag
Browse files Browse the repository at this point in the history
  Fixed windows verify github action build failure
  • Loading branch information
edwardUL99 committed Sep 25, 2022
1 parent cafc7fa commit 24dbd7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/it/MINVOKER-289/verify.groovy
Expand Up @@ -24,12 +24,13 @@ assert new File( basedir, 'target/it/project/touch.txt' )

File buildLog = new File( basedir, 'build.log' )

String executionString = "Executing: /bin/sh -c"
String executionString = "Executing:"
int mavenCommandIndex = buildLog.text.indexOf( executionString )
String commandLine = buildLog.text.substring( mavenCommandIndex, buildLog.text.indexOf( '\n', mavenCommandIndex ) )
String mavenCommand = commandLine.split( "&&" )[1].trim()
String commandLine = buildLog.text.substring( mavenCommandIndex, buildLog.text.indexOf( System.lineSeparator(),
mavenCommandIndex ) )
commandLine = commandLine.substring(commandLine.indexOf("mvn"));

assert Arrays.stream( mavenCommand.split( '\\s' ) )
assert Arrays.stream( commandLine.split( '\\s' ) )
.map( f -> f.replaceAll('\'', ''))
.filter(f -> f == '-U')
.count() > 0
Expand Up @@ -689,7 +689,7 @@ public abstract class AbstractInvokerMojo
* @since 3.3.1
*/
@Parameter( defaultValue = "false", property = "invoker.updateSnapshots" )
private boolean updateSnapshots = false;
private boolean updateSnapshots;

// internal state variables

Expand Down

0 comments on commit 24dbd7c

Please sign in to comment.