Skip to content

Commit

Permalink
Correct path manipulation on Windows and UNIX (#504)
Browse files Browse the repository at this point in the history
This fixes #489
  • Loading branch information
0x6675636b796f75676974687562 authored Feb 23, 2023
1 parent d76e538 commit 67267e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fun SaveProperties.Companion.of(args: Array<String>): SaveProperties {
val configFromCli = try {
parseArgs(fs, args)
} catch (e: IOException) {
return logErrorAndExit(
logErrorAndExit(
ExitCodes.INVALID_CONFIGURATION,
"Save expects to get the root directory for test files as the first CLI argument: save [cli-options] <test-root> [...]. " +
"Provided value to cli as a root for test directory and is not able to find it. " +
Expand All @@ -46,7 +46,7 @@ private fun SaveProperties.validate(): SaveProperties {
try {
fs.metadata(fullConfigPath)
} catch (e: FileNotFoundException) {
return logErrorAndExit(
logErrorAndExit(
ExitCodes.INVALID_CONFIGURATION, "Not able to find configuration file '$fullConfigPath'." +
" Please provide a valid path to the test config via command-line or using the file with properties. " +
" Error: ${e.message}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ class FixPlugin(
// instead, there was created sarif file with list of fixes, which we will apply ourselves
val fixedFiles = SarifFixAdapter(
sarifFile = sarifFile,
targetFiles = testsPaths
targetFiles = testsPaths,
testRoot = testConfig.getRootConfig().directory,
).process()

// sarif file was created by us, remove tmp data
Expand Down
10 changes: 10 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ dependencyResolutionManagement {
maven {
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "saveourtool/okio-extras"
url = uri("https://maven.pkg.github.com/saveourtool/okio-extras")
credentials {
username = providers.gradleProperty("gprUser").orNull
?: System.getenv("GITHUB_ACTOR")
password = providers.gradleProperty("gprKey").orNull
?: System.getenv("GITHUB_TOKEN")
}
}
}
}
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

0 comments on commit 67267e5

Please sign in to comment.