@@ -6,7 +6,7 @@ import paths from '@/utils/paths';
66import resources from '@/resources' ;
77import PathConflictManager from '@/main/pathConflictManager' ;
88import * as window from '@/window' ;
9- import { isUnixFsError } from '@/typings/unix.interface' ;
9+ import { isNodeError } from '@/typings/unix.interface' ;
1010
1111const INTEGRATIONS = [ 'docker' , 'helm' , 'kubectl' , 'nerdctl' ] ;
1212const console = Logging . background ;
@@ -49,9 +49,9 @@ export default class UnixlikeIntegrations {
4949 this . #results[ linkPath ] = `Already linked to ${ currentDest } ` ;
5050 }
5151 } catch ( error ) {
52- if ( isUnixFsError ( error ) && error . code === 'ENOENT' ) {
52+ if ( ( error as NodeJS . ErrnoException ) . code === 'ENOENT' ) {
5353 this . #results[ linkPath ] = false ;
54- } else if ( isUnixFsError ( error ) && error . code === 'EINVAL' ) {
54+ } else if ( ( error as NodeJS . ErrnoException ) . code === 'EINVAL' ) {
5555 this . #results[ linkPath ] = `File exists and is not a symbolic link` ;
5656 } else {
5757 this . #results[ linkPath ] = `Can't link to ${ linkPath } : ${ error } ` ;
@@ -73,7 +73,7 @@ export default class UnixlikeIntegrations {
7373 const message = `Error creating symlink for ${ linkPath } :` ;
7474
7575 console . error ( message , err ) ;
76- if ( isUnixFsError ( err ) ) {
76+ if ( err instanceof Error ) {
7777 this . #results[ linkPath ] = `${ message } ${ err . message } ` ;
7878 }
7979
@@ -86,7 +86,7 @@ export default class UnixlikeIntegrations {
8686 const message = `Error unlinking symlink for ${ linkPath } ` ;
8787
8888 console . error ( message , err ) ;
89- if ( isUnixFsError ( err ) ) {
89+ if ( err instanceof Error ) {
9090 this . #results[ linkPath ] = `${ message } ${ err . message } ` ;
9191 }
9292
@@ -113,7 +113,8 @@ export default class UnixlikeIntegrations {
113113 } ) ;
114114 }
115115 } catch ( error ) {
116- if ( ! ( isUnixFsError ( error ) ) ) {
116+ // if (error typeof NodeJS.ErrnoException) {
117+ if ( ! ( isNodeError ( error ) ) ) {
117118 return ;
118119 }
119120 switch ( error . code ) {
0 commit comments