Skip to content

Commit

Permalink
Fixed the install directory for the windows hosted machine (#7082)
Browse files Browse the repository at this point in the history
* Fixed the install directory for the windows hosted machine

* Fix for Unit Test
  • Loading branch information
lkillgore authored and lkillgore committed Apr 26, 2018
1 parent f6e7870 commit f06e9da
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tasks/UseRubyVersion/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@ describe('UseRubyVersion L0 Suite', function () {
};

await uut.useRubyVersion(parameters, uut.Platform.Windows);
assert.strictEqual(`${toolPath};`, mockPath);
assert.strictEqual(`${path.join(toolPath, 'bin')};`, mockPath);
});
});
2 changes: 1 addition & 1 deletion Tasks/UseRubyVersion/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 0,
"Minor": 134,
"Patch": 0
"Patch": 1
},
"preview": true,
"demands": [],
Expand Down
2 changes: 1 addition & 1 deletion Tasks/UseRubyVersion/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 0,
"Minor": 134,
"Patch": 0
"Patch": 1
},
"preview": true,
"demands": [],
Expand Down
4 changes: 1 addition & 3 deletions Tasks/UseRubyVersion/userubyversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ export async function useRubyVersion(parameters: TaskParameters, platform: Platf
].join(os.EOL));
}

let toolPath: string = installDir;
const toolPath: string = path.join(installDir, 'bin');
if (platform !== Platform.Windows) {
toolPath = path.join(installDir, 'bin');

// replace the default
const dest: string = '/usr/bin/ruby';
if (fs.existsSync(dest)) {
Expand Down

0 comments on commit f06e9da

Please sign in to comment.