Giter Site home page Giter Site logo

Comments (6)

rwjblue avatar rwjblue commented on August 31, 2024 1

@lifeart - The nested try catch seems fine, wanna send a PR?

from node-symlink-or-copy.

lifeart avatar lifeart commented on August 31, 2024
 try {
    fs.symlinkSync(canLinkSrc, canLinkDest)
  } catch (e) {
    fs.unlinkSync(canLinkSrc) // error from this point
    return false
  }

win 10, node 10.15, ember-cli 3.7

from node-symlink-or-copy.

lifeart avatar lifeart commented on August 31, 2024
 try {
    fs.symlinkSync(canLinkSrc, canLinkDest)
  } catch (e) {
    try {
       fs.unlinkSync(canLinkSrc) // error from this point
    } catch (err) {

    }
    return false
  }

works for me

from node-symlink-or-copy.

kellyselden avatar kellyselden commented on August 31, 2024

I'm seeing a similar stack trace

internal/fs/utils.js:227
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\Users\kelly\AppData\Local\Temp\canLinkSrc.tmp'
    at Object.unlinkSync (fs.js:1057:3)
    at testCanSymlink (C:\Users\kelly\AppData\Roaming\npm\node_modules\ember-cli\node_modules\symlink-or-copy\index.js:44:6)
    at Object.<anonymous> (C:\Users\kelly\AppData\Roaming\npm\node_modules\ember-cli\node_modules\symlink-or-copy\index.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.Module._load (internal/modules/cjs/loader.js:891:14)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\kelly\AppData\Roaming\npm\node_modules\ember-cli\node_modules\broccoli-funnel\index.js:10:23) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'C:\\Users\\kelly\\AppData\\Local\\Temp\\canLinkSrc.tmp'
}

from node-symlink-or-copy.

kellyselden avatar kellyselden commented on August 31, 2024

I'm also seeing this a lot on my Windows CI runs https://github.com/ember-cli/ember-cli-update/pull/841/checks?check_run_id=361250026#step:6:5446.

from node-symlink-or-copy.

lifeart avatar lifeart commented on August 31, 2024

@rwjblue @kellyselden #45

could not find source for original bugfix, but new changes shuld fix possible errors

from node-symlink-or-copy.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.