Skip to content

Commit a4b6b72

Browse files
authored
Merge pull request #769 from mattfarina/fix-win-crash
Restoring the integrations location on Windows
2 parents d6d3c68 + f30ff31 commit a4b6b72

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/utils/__tests__/paths.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ describe('paths', () => {
3838
darwin: '%HOME%/Library/State/rancher-desktop/driver/',
3939
},
4040
integration: {
41-
win32: Error(),
41+
// The integration code paths do not currently support error handling
42+
// and returning an error causes exceptions on Windows. This needs to
43+
// be reworked to handle no location on Windows. See that paths.ts
44+
// file for more detail.
45+
// win32: Error(),
46+
win32: '/usr/local/bin',
4247
darwin: '/usr/local/bin',
4348
},
4449
};

src/utils/paths.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ export class Win32Paths implements Paths {
8080
}
8181

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

0 commit comments

Comments
 (0)