Skip to content

Commit

Permalink
Merge pull request #278 from muno92/fix-277
Browse files Browse the repository at this point in the history
Fix error in self-hosted runner
  • Loading branch information
muno92 authored Feb 19, 2022
2 parents 91b39cd + 4028228 commit 8f89ba2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ jobs:
with:
solutionPath: TestSolution/TestSolution.sln
failOnIssue: '0'
# Reproduce second time execution on self-hosted runner
- uses: ./
with:
solutionPath: TestSolution/TestSolution.sln
failOnIssue: '0'
11 changes: 11 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/installer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import * as io from '@actions/io'

export class Installer {
//TODO check dotnet sdk in constructor
async install(version: string): Promise<number> {
// If JetBrains.ReSharper.GlobalTools is already installed, skip installation to avoid install error.
try {
await io.which('jb', true)
core.info(
'JetBrains.ReSharper.GlobalTools is already installed, so skip installation.'
)
return 0
} catch (Error) {
core.info('Install JetBrains.ReSharper.GlobalTools.')
}

return exec.exec(
`dotnet tool install -g JetBrains.ReSharper.GlobalTools --version ${version}`
)
Expand Down

0 comments on commit 8f89ba2

Please sign in to comment.