Hi

I'll see if I can get the relative part working also,
if not, we're stuck for the moment with fixed paths


with kind regards
Ruben Willems


On 5 September 2012 11:23, Alex Vanden Abeele
<[email protected]>wrote:

> Hi Ruben,
>
> I got it working here, and I wanted to share my findings. I replaced the
> buildargs line as I mentioned in the previous post in the 1.8.1 source and
> compiled that. The arguments are now passed correctly.
>
> However, I still got the directory not found exception, and when looking
> into the code I came to the conclusion that the working directory is set to
> the default scriptsDirectory. That's weird because I did set the scripts
> directory, but to a relative path, relative to the project working
> directory. I also have this in the 1.6 version.
>
> The only solution is to include a drive letter in the scriptsDirectory and
> only then the correct working directory is set. This is a solution for both
> the 1.6 and 1.8 versions.
>
> Thanks for your effort,
> Alex
>
>
> On Wednesday, September 5, 2012 10:39:42 AM UTC+2, Ruben Willems wrote:
>
>> Hi
>>
>> found the bug and fixed it
>>
>> will release a new version this evening
>> sorry for the trouble
>>
>> with kind regards
>> Ruben Willems
>>
>>
>>
>> On 5 September 2012 09:37, Alex Vanden Abeele <[email protected]>wrote:
>>
>>> I just noticed there was an update that fixes a powershell issue, so I
>>> installed the 1.8.1, Still the same problem. I can specify the scripts
>>> directory, but I used to get another error if I did that. Now I get this:
>>>
>>> <buildresults>
>>>   <message level="Error">The term 'modules\host\' is not recognized as the 
>>> name of a cmdlet, function, s</message>
>>>   <message level="Error">cript file, or operable program. Check the 
>>> spelling of the name, or if a path w</message>
>>>   <message level="Error">as included, verify that the path is correct and 
>>> try again.</message>
>>>   <message level="Error">At line:1 char:14</message>
>>>   <message level="Error">+ modules\host\ <<<<  -file 
>>> build\tool\msvs\versionupdater**.ps1</message>
>>>   <message level="Error">    + CategoryInfo          : ObjectNotFound: 
>>> (modules\host\:String) [], Comma </message>
>>>   <message level="Error">   ndNotFoundException</message>
>>>   <message level="Error">    + FullyQualifiedErrorId : 
>>> CommandNotFoundException</mess**age>
>>>   <message level="Error"> </message></buildresults>
>>>
>>> Which is totally different than what I got from the 1.8.0 version, so 
>>> indeed a change has been made.
>>>
>>> But seeing this I decided to look into the code of the powershell task, and 
>>> behold: the line
>>>
>>> if (!string.IsNullOrEmpty(**BuildArgs)) builder.AppendArgument(**BuildArgs);
>>>
>>> apparently is put BEFORE the -file argument, so off course this cannot work.
>>>
>>>
>>> Can this be fixed that it is back after the -file and script parameters, as 
>>> it was in the 1.6 source? Thanks!
>>>
>>>
>>>
>>>
>>> On Wednesday, September 5, 2012 8:55:06 AM UTC+2, Alex Vanden Abeele
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I'm running the latest ccnet server version, 1.8.0.0, on a win2008 R2
>>>> server (64bit). When running a powershell task I get the exception at the
>>>> bottom of this message. The execution policy is set to unrestricted (to be
>>>> sure), both for the 32bit and the 64bit version of powershell.
>>>>
>>>> For some reason the task appends folders that indeed do not exist to my
>>>> script paths.
>>>>
>>>> The node in my project is the following:
>>>>
>>>> <powershell>
>>>>                 <description>Updating version number of the
>>>> host</description>
>>>>                 <script>build/tool/msvs/**versio**nupdater.ps1</script>
>>>>                 <buildArgs>/modules/host/</**bui**ldArgs>
>>>>             </powershell>
>>>>
>>>>
>>>> Anybody any idea what I can do? I never had this before and I've used
>>>> this script often on several ccnet servers.
>>>>
>>>> <exception><![CDATA[**ThoughtWor**ks.CruiseControl.**Core.Tasks.**BuilderException:
>>>>  Unable to execute: FileName: 
>>>> [C:\Windows\System32\**WindowsPo**werShell\v1.0\**powershell.exe] -- 
>>>> Arguments: [-nologo -NoProfile -NonInteractive -file 
>>>> "C:\Users\Administrator\**Docume**nts\WindowsPowerShell\**build/**tool/msvs/**versionupdater.ps1"
>>>>  /modules/host/] -- WorkingDirectory: 
>>>> [C:\Users\Administrator\**Docume**nts\WindowsPowerShell\] -- 
>>>> StandardInputContent: [] -- Timeout: [600000]
>>>> System.IO.**DirectoryNotFoundExc**eption: Directory does not exist: 
>>>> C:\Users\Administrator\**Documen**ts\WindowsPowerShell\
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessInfo.**CreateProce**ss()
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessExecutor.**Runnabl**eProcess..ctor(**ProcessInfo
>>>>  processInfo, String projectName, String publicArgs)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessExecutor.**Execute**(ProcessInfo
>>>>  processInfo)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Tasks.PowerShellTask.**Attempt**ToExecute(ProcessInfo
>>>>  info) ---> System.IO.**DirectoryNotFoundExc**eption: Directory does not 
>>>> exist: C:\Users\Administrator\**Documen**ts\WindowsPowerShell\
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessInfo.**CreateProce**ss()
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessExecutor.**Runnabl**eProcess..ctor(**ProcessInfo
>>>>  processInfo, String projectName, String publicArgs)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Util.ProcessExecutor.**Execute**(ProcessInfo
>>>>  processInfo)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Tasks.PowerShellTask.**Attempt**ToExecute(ProcessInfo
>>>>  info)
>>>>    --- End of inner exception stack trace ---
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Tasks.PowerShellTask.**Attempt**ToExecute(ProcessInfo
>>>>  info)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Tasks.PowerShellTask.**Execute**(IIntegrationResult
>>>>  result)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Tasks.TaskBase.Run(**IIntegrat**ionResult
>>>>  result)
>>>>    at ThoughtWorks.CruiseControl.**Cor**e.Project.RunTask(ITask task, 
>>>> IIntegrationResult result, Boolean isPublisher)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Project.RunTasks(**IIntegratio**nResult
>>>>  result, IList tasksToRun, Dictionary`2 parameterValues)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.Project.Run(**IIntegrationResu**lt 
>>>> result)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.IntegrationRunner.Build(**IInt**egrationResult
>>>>  result)
>>>>    at 
>>>> ThoughtWorks.CruiseControl.**Cor**e.IntegrationRunner.**Integrate(**IntegrationRequest
>>>>  request) BaseDirectory: 
>>>> C:\Users\Administrator\**Documen**ts\WindowsPowerShell\, PowerShell: 
>>>> powershell.exe]]></exception>
>>>>
>>>>
>>>>
>>>>
>>

Reply via email to