{"action":"created","issue":{"url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/28","repository_url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack","labels_url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/28/comments","events_url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/28/events","html_url":"https://github.com/openalm/Extension-UtilitiesPack/issues/28","id":146540550,"number":28,"title":"Incorrect file being used for tempFile contents in tokenize.ps1","user":{"login":"MarcelMichau","id":7761114,"avatar_url":"https://avatars.githubusercontent.com/u/7761114?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcelMichau","html_url":"https://github.com/MarcelMichau","followers_url":"https://api.github.com/users/MarcelMichau/followers","following_url":"https://api.github.com/users/MarcelMichau/following{/other_user}","gists_url":"https://api.github.com/users/MarcelMichau/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcelMichau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcelMichau/subscriptions","organizations_url":"https://api.github.com/users/MarcelMichau/orgs","repos_url":"https://api.github.com/users/MarcelMichau/repos","events_url":"https://api.github.com/users/MarcelMichau/events{/privacy}","received_events_url":"https://api.github.com/users/MarcelMichau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T08:04:38Z","updated_at":"2016-04-16T18:32:31Z","closed_at":null,"body":"I was having an issue where the destination file wasn't being tokenized at all, and looking at the tokenize.ps1 script I noticed that the script used the destination file's contents to iterate over, searching for matches. However, it is the source file which contains the tokens.  Changing the `Copy-Item` step to `Copy-Item -Force $SourcePath $tempFile` allowed the destination file to be transformed correctly.\r\n\r\nIf the source file contains the tokens, i.e `\"__VariableName__\"`, then it would make sense to copy the contents of the source file into the temp file, instead of the destination file, as done at `Copy-Item -Force $DestinationPath $tempFile`.\r\n\r\nAm I perhaps not using the task as intended? Any help would be appreciated."},"comment":{"url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/comments/210870793","html_url":"https://github.com/openalm/Extension-UtilitiesPack/issues/28#issuecomment-210870793","issue_url":"https://api.github.com/repos/openalm/Extension-UtilitiesPack/issues/28","id":210870793,"user":{"login":"harshil93","id":1177554,"avatar_url":"https://avatars.githubusercontent.com/u/1177554?v=3","gravatar_id":"","url":"https://api.github.com/users/harshil93","html_url":"https://github.com/harshil93","followers_url":"https://api.github.com/users/harshil93/followers","following_url":"https://api.github.com/users/harshil93/following{/other_user}","gists_url":"https://api.github.com/users/harshil93/gists{/gist_id}","starred_url":"https://api.github.com/users/harshil93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshil93/subscriptions","organizations_url":"https://api.github.com/users/harshil93/orgs","repos_url":"https://api.github.com/users/harshil93/repos","events_url":"https://api.github.com/users/harshil93/events{/privacy}","received_events_url":"https://api.github.com/users/harshil93/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T18:32:31Z","updated_at":"2016-04-16T18:32:31Z","body":"If you go over the [task documentation](https://github.com/openalm/Extension-UtilitiesPack/blob/master/Utilites/overview.md), it is clearly mentioned that the tokens are expected in the source file. If destination file is specified, the source file is not modified instead a destination file is created which has source file with tokens replaced.\r\n\r\nFor eg. you have a file config.example.conf which you specify as a source file and has tokens. You want a config.conf file created which has tokens replaced, then you will specify config.conf as destination file. \r\n\r\n"}}