[Issue #108] Overwrite CLI Tools (#115)

* Trying this

* Revert "Trying this"

This reverts commit 46eab8f218.

* Put exists check around tools move

* Remove directory before copying over it

* Reverted indent

* Revert additional two spaces
This commit is contained in:
Laura 2021-03-03 09:02:20 +11:00 committed by GitHub
parent 0bdb2caf82
commit 7506bcd002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -120,6 +120,9 @@ async function installSdkManager(): Promise<string> {
fs.mkdirSync(path.dirname(desiredLocation), {recursive: true})
// @TODO: use io.mv instead of fs-extra once following issue is resolved:
// https://github.com/actions/toolkit/issues/706
if (fs.existsSync(desiredLocation)) fse.removeSync(desiredLocation)
fse.moveSync(
path.join(cmdlineToolsExtractedLocation, 'cmdline-tools'),
desiredLocation