Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
catchError(() => {
if (!process.env.HOME) {
throw new Error("HOME not defined");
}
const dest = join(process.env.HOME, ".local/bin/nteract");
return createSymlinkObservable(target, dest);
})
);
catchError(() => {
const dest = join(process.env.HOME, ".local/bin/nteract");
return createSymlinkObservable(target, dest);
})
);
mergeMap(() => {
const target = join(binDir, "nteract.sh");
return createSymlinkObservable(target, "/usr/local/bin/nteract").pipe(
catchError(() => {
if (!process.env.HOME) {
throw new Error("HOME not defined");
}
const dest = join(process.env.HOME, ".local/bin/nteract");
return createSymlinkObservable(target, dest);
})
);
})
);
mergeMap(() => {
const target = join(binDir, "nteract.sh");
return createSymlinkObservable(target, "/usr/local/bin/nteract").pipe(
catchError(() => {
const dest = join(process.env.HOME, ".local/bin/nteract");
return createSymlinkObservable(target, dest);
})
);
})
);