make-slink.js 429 B

123456789101112131415161718192021
  1. /**
  2. * @author Toru Nagashima
  3. * @copyright 2016 Toru Nagashima. All rights reserved.
  4. * See LICENSE file in root directory for full license.
  5. */
  6. 'use strict'
  7. const fs = require('fs')
  8. const path = require('path')
  9. try {
  10. fs.symlinkSync(
  11. path.resolve(__dirname, '../test/lib'),
  12. path.resolve(__dirname, '../test-workspace/tasks/lib'),
  13. 'junction'
  14. )
  15. } catch (err) {
  16. if (err.code !== 'EEXIST') {
  17. throw err
  18. }
  19. }