Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 396 forks source link

Running draft init fails on Windows when creating symlinks #587

Closed alexpilotti closed 6 years ago

alexpilotti commented 6 years ago

draft init fails on Windows trying to create a symlink due to the ratget parent path being missing:

Error: symlink C:\Users\Administrator\.draft\cache\packs\https-github.com-Azure-draft
 C:\Users\Administrator\.draft\packs\github.com\Azure\draft: The system cannot find the path specified.

By manually creating the target parent path ("C:\Users\Administrator\.draft\packs\github.com\Azure" in this case) everything works.

Note: this is unrelated from having symlinks enabled or not for non elevated contexts.

PS C:\Users\Administrator\go\src\github.com\Azure\draft> .\bin\draft init
Creating C:\Users\Administrator\.draft
Creating C:\Users\Administrator\.draft\plugins
Creating C:\Users\Administrator\.draft\packs
Installing default plugins...
Downloading https://azuredraft.blob.core.windows.net/draft/pack-repo-canary-windows-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3002k  100 3002k    0     0  1038k      0  0:00:02  0:00:02 --:--:-- 1038k
Preparing to install into C:\Users\Administrator\.draft/plugins/draft-pack-repo
draft-pack-repo installed into C:\Users\Administrator\.draft/plugins/draft-pack-repo/draft-pack-repo
The Draft pack repository plugin.

Usage:
  pack-repo [command]

Available Commands:
  add         add a pack repository
  help        Help about any command
  list        list all installed pack repositories
  remove      remove a pack repository
  update      fetch the newest version of all pack repositories using git.
  version     display version information

Flags:
      --debug   enable verbose output
  -h, --help    help for pack-repo

Use "pack-repo [command] --help" for more information about a command.
Installed plugin: pack-repo
Installation of default plugins complete
Installing default pack repositories...
Installing pack repo from https://github.com/Azure/draft
Error: symlink C:\Users\Administrator\.draft\cache\packs\https-github.com-Azure-draft C:\Users\Administrator\.draft\packs\github.com\Azure\draft: The system cannot find the path specified.
Error: exit status 1