Skip to content

Commit

Permalink
Merge pull request #769 from mattfarina/fix-win-crash
Browse files Browse the repository at this point in the history
Restoring the integrations location on Windows
  • Loading branch information
mattfarina authored Oct 11, 2021
2 parents d6d3c68 + f30ff31 commit a4b6b72
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/utils/__tests__/paths.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ describe('paths', () => {
darwin: '%HOME%/Library/State/rancher-desktop/driver/',
},
integration: {
win32: Error(),
// The integration code paths do not currently support error handling
// and returning an error causes exceptions on Windows. This needs to
// be reworked to handle no location on Windows. See that paths.ts
// file for more detail.
// win32: Error(),
win32: '/usr/local/bin',
darwin: '/usr/local/bin',
},
};
Expand Down
7 changes: 6 additions & 1 deletion src/utils/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ export class Win32Paths implements Paths {
}

get integration(): string {
throw new Error('integration path not available for Windows');
return '/usr/local/bin';
// The current code paths on Windows fail if no location is returned to watch.
// Before we can throw an exception, the code paths that use the returned string
// need to be refactored to handle an error. The current location being returned
// is the location that has been in use.
// throw new Error('integration path not available for Windows');
}
}

Expand Down

0 comments on commit a4b6b72

Please sign in to comment.