Skip to content

Commit 0d0de55

Browse files
authored
Merge pull request #411 from dscho/delete-tmp-afterwards
Delete `.tmp` once it is no longer needed
2 parents 415fa25 + 24a2e3e commit 0d0de55

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
- name: Verify that the Bash of Git for Windows' SDK is used
4343
shell: bash
4444
run: |
45-
set -x
45+
set -ex
46+
test ! -e .tmp
4647
echo "This is the MSYS2 pseudo root: $(cygpath -aw /)"
4748
test "gcc is /mingw64/bin/gcc" = "$(type gcc)"
4849
test "prove is /usr/bin/core_perl/prove" = "$(type prove)"

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/git.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as core from '@actions/core'
22
import {ChildProcess, spawn} from 'child_process'
33
import {Octokit} from '@octokit/rest'
44
import {delimiter} from 'path'
5+
import * as fs from 'fs'
56

67
const gitForWindowsUsrBinPath = 'C:/Program Files/Git/usr/bin'
78
const gitExePath = 'C:/Program Files/Git/cmd/git.exe'
@@ -160,7 +161,7 @@ export async function getViaGit(
160161
child.on('close', code => {
161162
core.endGroup()
162163
if (code === 0) {
163-
resolve()
164+
fs.rm('.tmp', {recursive: true}, () => resolve())
164165
} else {
165166
reject(new Error(`process exited with code ${code}`))
166167
}

0 commit comments

Comments
 (0)