Skip to content

Commit

Permalink
use path.resolve instead of str lits for patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer committed Aug 9, 2024
1 parent 3ab2f2e commit 450cf36
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,11 @@ private static String getSmithyFilePattern(Path path, boolean isWatcherPattern)
return glob;
}

// we have a directory
if (glob.endsWith("/")) {
glob = glob + "**";
} else {
glob = glob + "/**";
}

String pat = "**";
if (isWatcherPattern) {
glob += ".{smithy,json}";
pat += ".{smithy,json}";
}

return glob;
return path.resolve(pat).toString();
}
}

0 comments on commit 450cf36

Please sign in to comment.