Skip to content

Commit f30ff31

Browse files
committed
Restoring the integrations location on Windows
Windows does not need this location but there are code paths that do not handle an error being returned. There are multiple code paths like this. Restoring the mac location, which has long been used. In a future change, this can be removed and the other code paths fixed to handle an error being returned. Signed-off-by: Matt Farina <matt.farina@suse.com>
1 parent d6d3c68 commit f30ff31

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)