-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Proper File Separator for OS #459
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,29 +33,30 @@ async function run(): Promise<void> { | |
if (installNative) { | ||
const ktNativePath = await tc.downloadTool(nativeDownloadUrl(version)) | ||
core.debug(`Downloaded Kotlin Native ${version} to ${ktNativePath}`) | ||
core.exportVariable('KOTLIN_NATIVE_HOME', ktNativePath) | ||
|
||
const ktNativePathExtractedFolder = await extractNativeArchive(ktNativePath) | ||
nativeCachedPath = await tc.cacheDir(ktNativePathExtractedFolder, 'kotlin-native', version) | ||
} | ||
} | ||
} | ||
|
||
const s = IS_WINDOWS ? '\\' : '/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most likely. |
||
|
||
/* | ||
The order of addPath call here matter because both archives have a "kotlinc" binary. | ||
*/ | ||
if (installNative) { | ||
const nativePath = `${nativeCachedPath}/kotlin-native-prebuilt-${osName()}-${osArch()}-${version}` | ||
core.addPath(`${nativePath}/bin`) | ||
const nativePath = `${nativeCachedPath}${s}kotlin-native-prebuilt-${osName()}-${osArch()}-${version}` | ||
core.addPath(`${nativePath}${s}bin`) | ||
core.exportVariable('KOTLIN_NATIVE_HOME', nativePath) | ||
core.debug(`Added ${nativePath}/bin to PATH`) | ||
core.debug(`Added ${nativePath}${s}bin to PATH`) | ||
await exec.exec('kotlinc-native', ['-version']) | ||
} | ||
|
||
const kotlinPath = `${cachedPath}/kotlinc` | ||
core.addPath(`${kotlinPath}/bin`) | ||
const kotlinPath = `${cachedPath}${s}kotlinc` | ||
core.addPath(`${kotlinPath}${s}bin`) | ||
core.exportVariable('KOTLIN_HOME', kotlinPath) | ||
core.debug(`Added ${kotlinPath}/bin to PATH`) | ||
core.debug(`Added ${kotlinPath}${s}bin to PATH`) | ||
await exec.exec('kotlinc', ['-version']) | ||
|
||
const script = core.getInput('script') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how this is related to the pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's removing a duplicate statement. It does the same thing already below. I just forgot to include that in the description.