{"action":"created","issue":{"url":"https://api.github.com/repos/timkelty/shipit-shared/issues/33","labels_url":"https://api.github.com/repos/timkelty/shipit-shared/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/timkelty/shipit-shared/issues/33/comments","events_url":"https://api.github.com/repos/timkelty/shipit-shared/issues/33/events","html_url":"https://github.com/timkelty/shipit-shared/issues/33","id":119393928,"number":33,"title":"Are you open to removing quotes in the `ln` command?","user":{"login":"weotch","id":77567,"avatar_url":"https://avatars.githubusercontent.com/u/77567?v=3","gravatar_id":"","url":"https://api.github.com/users/weotch","html_url":"https://github.com/weotch","followers_url":"https://api.github.com/users/weotch/followers","following_url":"https://api.github.com/users/weotch/following{/other_user}","gists_url":"https://api.github.com/users/weotch/gists{/gist_id}","starred_url":"https://api.github.com/users/weotch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weotch/subscriptions","organizations_url":"https://api.github.com/users/weotch/orgs","repos_url":"https://api.github.com/users/weotch/repos","events_url":"https://api.github.com/users/weotch/events{/privacy}","received_events_url":"https://api.github.com/users/weotch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-29T22:51:20Z","updated_at":"2015-12-08T23:18:25Z","closed_at":"2015-11-30T17:05:00Z","body":"I was hoping to be able to use `~` in my `deployTo`, like `\"~/myapp/staging\"`.  However, [the tilde doesn't work](http://unix.stackexchange.com/a/151865) when it's used with quotes like:\r\n\r\n```\r\nError: Command failed: /bin/sh -c ssh xxxxx@xxx.xxx.xxx.xxx \"if ( ! [ -h \\\"~/myapp/staging/releases/20151129224812/storage/framework/sessions\\\" ] ); then rm -rf \\\"~/myapp/staging/releases/20151129224812/storage/framework/sessions\\\" 2> /dev/null; ln -s \\\"~/myapp/staging/shared/storage/framework/sessions\\\" \\\"~/myapp/staging/releases/20151129224812/storage/framework/sessions\\\"; fi\"\r\nln: failed to create symbolic link ‘~/myapp/staging/releases/20151129224812/storage/framework/sessions’: No such file or directory\r\n```\r\n\r\nAre the quotes surrounding the paths even necessary? FWIW, I tried using `$HOME` instead of `~` but it breaks some of the `shipit-deploy` stuff."},"comment":{"url":"https://api.github.com/repos/timkelty/shipit-shared/issues/comments/163053174","html_url":"https://github.com/timkelty/shipit-shared/issues/33#issuecomment-163053174","issue_url":"https://api.github.com/repos/timkelty/shipit-shared/issues/33","id":163053174,"user":{"login":"weotch","id":77567,"avatar_url":"https://avatars.githubusercontent.com/u/77567?v=3","gravatar_id":"","url":"https://api.github.com/users/weotch","html_url":"https://github.com/weotch","followers_url":"https://api.github.com/users/weotch/followers","following_url":"https://api.github.com/users/weotch/following{/other_user}","gists_url":"https://api.github.com/users/weotch/gists{/gist_id}","starred_url":"https://api.github.com/users/weotch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weotch/subscriptions","organizations_url":"https://api.github.com/users/weotch/orgs","repos_url":"https://api.github.com/users/weotch/repos","events_url":"https://api.github.com/users/weotch/events{/privacy}","received_events_url":"https://api.github.com/users/weotch/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T23:18:25Z","updated_at":"2015-12-08T23:18:25Z","body":"Just realized today that this solution actually didn't work.  Errors weren't being thrown but the symlinks were bad, they pointed to directories that didn't exist.\r\n\r\nI tried to manually expand my tildes like this:\r\n\r\n```js\r\nshipit.blTask('tilde', function() {\r\n  if (shipit.config.deployTo.indexOf('~/') < 0) {\r\n    return;\r\n  }\r\n  return shipit.remote('echo ~/').then(function(servers) {\r\n    var path;\r\n    path = servers[0].stdout.trim();\r\n    shipit.config.deployTo = shipit.config.deployTo.replace('~/', path);\r\n  });\r\n});\r\n```\r\n\r\nThe `shared:link:dirs` task does use the modified `shipit.config.deployTo` but the `shared:create-dirs` task doesn't, using the original, tilde-ed `deployTo`.\r\n\r\n--\r\n\r\nI can just include absolute paths, but I wanted to update the ticket for others sake."}}