Skip to content

Commit

Permalink
Add .exe extension to programs on windows
Browse files Browse the repository at this point in the history
Fixes dmd CI on windows.

See: #77 (comment)
Signed-off-by: Andrei Horodniceanu <[email protected]>
  • Loading branch information
the-horo authored and WebFreak001 committed May 31, 2024
1 parent 0a7469b commit 8df2fcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as semver from './semver'
import * as exec from '@actions/exec'

const sep = (process.platform == 'win32' ? '\\' : '/')
const exeExt = (process.platform == 'win32' ? '.exe' : '')

/** Base interface for all D tools */
export interface ITool {
Expand Down Expand Up @@ -107,7 +108,7 @@ export class Compiler implements ITool {

/** Set the DC environment variable to point to the newly extracted compiler */
setDC(root: string) {
core.exportVariable("DC", root + this.binPath + sep + this.name)
core.exportVariable("DC", root + this.binPath + sep + this.name + exeExt)
}

/** Take all the necessary steps to make the compiler available on the host
Expand Down Expand Up @@ -655,7 +656,7 @@ export class LDC extends Compiler {

export class Dub implements ITool {
private readonly name = 'dub'
private readonly exeName = this.name + (process.platform == 'win32' ? '.exe' : '')
private readonly exeName = this.name + exeExt
constructor(private url: string, private version: string) {}

/** Parse a version string and compute the associated version
Expand Down

0 comments on commit 8df2fcb

Please sign in to comment.