Skip to content

Commit

Permalink
Changed types of attach and detach functions results
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaterina-tatanova committed Jul 6, 2020
1 parent 7a4c920 commit 500756d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tasks/JavaToolInstallerV0/taskutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ export function sudo(toolName: string): ToolRunner {
* Only for macOS.
* @param sourceFile Path to a disk image file.
*/
export async function attach(sourceFile: string): Promise<void> {
export async function attach(sourceFile: string): Promise<number> {
console.log(tl.loc('AttachDiskImage'));
const hdiutil = sudo('hdiutil');
hdiutil.line(`attach "${sourceFile}"`);
await hdiutil.exec();
return await hdiutil.exec();
}

/**
* Detach a disk image.
* @param volumePath Path to the attached disk image.
*/
export async function detach(volumePath: string): Promise<void> {
export async function detach(volumePath: string): Promise<number> {
console.log(tl.loc('DetachDiskImage'));
const hdiutil = sudo('hdiutil');
hdiutil.line(`detach "${volumePath}"`);
await hdiutil.exec();
return await hdiutil.exec();
}

0 comments on commit 500756d

Please sign in to comment.