{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/3309","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/3309/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/3309/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/3309/events","html_url":"https://github.com/mitchellh/packer/issues/3309","id":138572087,"number":3309,"title":"File-provisioner fails to upload hidden files from source root","user":{"login":"mak18ah","id":417040,"avatar_url":"https://avatars.githubusercontent.com/u/417040?v=3","gravatar_id":"","url":"https://api.github.com/users/mak18ah","html_url":"https://github.com/mak18ah","followers_url":"https://api.github.com/users/mak18ah/followers","following_url":"https://api.github.com/users/mak18ah/following{/other_user}","gists_url":"https://api.github.com/users/mak18ah/gists{/gist_id}","starred_url":"https://api.github.com/users/mak18ah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mak18ah/subscriptions","organizations_url":"https://api.github.com/users/mak18ah/orgs","repos_url":"https://api.github.com/users/mak18ah/repos","events_url":"https://api.github.com/users/mak18ah/events{/privacy}","received_events_url":"https://api.github.com/users/mak18ah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/duplicate","name":"duplicate","color":"cccccc"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/provisioner/file","name":"provisioner/file","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-04T20:01:39Z","updated_at":"2016-03-04T20:36:38Z","closed_at":"2016-03-04T20:36:38Z","body":"For file-provisioner, when local source path to file contains a dotfile at root fails to upload into target machine.\r\nsample packer template to illustrate the issue:\r\n```\r\n{\r\n  \"variables\": {\r\n    \"app_slug\": \"test-app\"\r\n  },\r\n  \"builders\": [\r\n    {\r\n      \"type\": \"docker\",\r\n      \"image\": \"ubuntu:14.04\",\r\n      \"discard\": true\r\n    }\r\n  ],\r\n  \"provisioners\": [\r\n    {\r\n          \"type\": \"file\",\r\n          \"source\": \".\",\r\n          \"destination\": \"/tmp/app\"\r\n    },\r\n    {\r\n          \"type\": \"file\",\r\n          \"source\": \".nvmrc\",\r\n          \"destination\": \"/tmp/app\"\r\n    },\r\n    {\r\n       \"type\":\"shell\",\r\n       \"inline\":[\r\n         \"echo `cat /tmp/app/test/.hello`\",\r\n         \"echo `cat /tmp/app/.nvmrc`\"\r\n       ]\r\n    }\r\n  ]\r\n}\r\n```\r\n Example source dir:\r\n```\r\n├── build.log\r\n├── compile.json\r\n├── .nvmrc    # fails to copy this over to target, even when explicitly specified in packer template\r\n└── test\r\n    ├── .hello\r\n    └──  project\r\n        └── dir\r\n            └── example.txt\r\n```\r\n\r\nDoes not occur with dotfiles located in subdirectories.\r\n\r\nCreated project example here: https://github.com/mak18ah/packer-hidden-source-files-fail use `PACKER_LOG=1 packer build compile.json` to run\r\nHere is the debug log: https://gist.github.com/mak18ah/465cd29945371ad09e62#file-file-provisioner-source-dotfile\r\n\r\nPacker client version info:\r\n```\r\n$ PACKER_LOG=1 packer -version\r\n2016/03/04 14:57:47 [INFO] Packer version: 0.8.6  f8f7b7a34c1be06058f5aca23a51247db12cdbc5+CHANGES\r\n2016/03/04 14:57:47 Packer Target OS/Arch: darwin amd64\r\n2016/03/04 14:57:47 Built with Go Version: go1.5\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/192458241","html_url":"https://github.com/mitchellh/packer/issues/3309#issuecomment-192458241","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/3309","id":192458241,"user":{"login":"cbednarski","id":649798,"avatar_url":"https://avatars.githubusercontent.com/u/649798?v=3","gravatar_id":"","url":"https://api.github.com/users/cbednarski","html_url":"https://github.com/cbednarski","followers_url":"https://api.github.com/users/cbednarski/followers","following_url":"https://api.github.com/users/cbednarski/following{/other_user}","gists_url":"https://api.github.com/users/cbednarski/gists{/gist_id}","starred_url":"https://api.github.com/users/cbednarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbednarski/subscriptions","organizations_url":"https://api.github.com/users/cbednarski/orgs","repos_url":"https://api.github.com/users/cbednarski/repos","events_url":"https://api.github.com/users/cbednarski/events{/privacy}","received_events_url":"https://api.github.com/users/cbednarski/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T20:36:38Z","updated_at":"2016-03-04T20:36:38Z","body":"Thanks for the report! I think this is a duplicate of #3142, even though the wording is slightly different. I'm going to close this issue and copy your report into #3142 so I can keep everything in one place. If you have any additional feedback please include it there! Thanks!"}}