Skip to content

Commit

Permalink
fix: Avoid destructuring to not make brittle this-context of "fs" not…
Browse files Browse the repository at this point in the history
… break
  • Loading branch information
Iku-turso committed Apr 24, 2023
1 parent 283fe76 commit 5db7984
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const createSymlinkInjectable = getInjectable({
return async ({ target, source }) => {
await pipeline(source, dirname, ensureDirectory);

const { isDirectory } = await stat(target);
const result = await stat(target);

const dirOrFile = isDirectory() ? 'dir' : 'file';
const dirOrFile = result.isDirectory() ? 'dir' : 'file';

return symlink(target, source, dirOrFile);
};
Expand Down

0 comments on commit 5db7984

Please sign in to comment.