calvinmetcalf / copyfiles

copy files on the command line
MIT License
411 stars 52 forks source link

Version 2.4.1 fails #109

Open springcomp opened 2 years ago

springcomp commented 2 years ago

This is a duplicate of issue #100 which has been closed.

Environment: Windows NodeJS: 14.7.1 copyfiles: 2.4.1

Error:

> npx copyfiles
  outDir = outDir.startsWith('~') ? untildify(outDir) : outDir;
                  ^

TypeError: Cannot read property 'startsWith' of undefined
    at copyFiles (C:\Projects\springcomp\yo\yeoman-custom-generator\generator-sample\node_modules\copyfiles\index.js:93:19)
    at Object.<anonymous> (C:\Projects\springcomp\yo\yeoman-custom-generator\generator-sample\node_modules\copyfiles\copyfiles:40:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47

As suggested in the #100, this is the output of console.log(argv) on copyfiles.

{ _: [], '$0': 'node_modules\\copyfiles\\copyfiles' }
springcomp commented 2 years ago

Also, the help screen is truncated:

> npx copyfiles --help
Options :
      --help     Affiche l'aide                                        [boolean]
      --version  Affiche le numéro de version                          [boolean]
  -u, --up       slice a path off the bottom of the paths               [number]