Closed severisv closed 5 years ago
Thanks for reporting. Can you try using the advanced options and setting the full command line?
Also can you attach the complete verbose (Setting "System.Debug" to true) output? It will help me fix this without the need to reproduce myself ...
Ok, so I tried different variations:
Normal step with reference to scripts/build.fsx
(not working):
Running full command line (fake run build.fsx
), with working directory set to scripts
(not working):
Lastly, I tried a combination of the two, normal task with script path set to build.fsx
, working directory set to scripts
(working):
@severisv While testing I think there are some edge cases when specifying working dir and relative paths.
Would you expect the relative path to be relative to the working directory, relative to the project root or maybe both if only one exists?
I'm a bit conflicted, because when I first set it up, I just specified scripts/build.fsx
and expected it to run with scripts
as my working directory without putting any thought into. Actually thinking about it, however, I belive the sound expectation is that it would run scripts/build.fsx
from the root folder.
I think the problem for me was that the working directory option was "hidden" under "Complete Command Line", so the whole working directory logic didn't really cross my mind. Also, when I first tried it, I actually thought the working directory setting only applied to the "Set the complete fake command line" way of running the script.
For me, moving the Working Directory-option up with the other main inputs would probably make it easier to understand.
To answer your question I think
somefolder/build.fsx
should run that script from the root foldersomefolder
and script to be build.fsx
should run the same script from somefolder
I'm a bit conflicted, because when I first set it up, I just specified scripts/build.fsx and expected it to run with scripts as my working directory without putting any thought into.
Actually this was the "intended" behavior, but as it is not working anyway we can change that in any aspect
Specifying working directory somefolder and script to be build.fsx should run the same script from somefolder
Yes I guess that is was the user assumes, however it is not easy to implement as VSTS is resolving the paths from the file picker already, so we never see the relative path. We could change to a regular text input, but then users can no longer just select the build script.
I'd assume the most "standard" use case is to add the task and select a build script.
...
now the question is what working directory we choose by default. I tend to choose the "root" as well because otherwise how would you choose the "root"? You can always select a subfolder via ...
on the working directory input.This makes sense to me aswell, I do see the point of users selecting the file with ...
👍
@severisv Please try again with 1.3.15
(task version 1.0.8
). I have tested several combination with an internal test-suite and updated the info boxes slightly.
Running
- task: isaacabraham.fsharp-helpers-extension.a2dadf20-1a83-4220-a4ee-b52f6c77f3cf.FAKE5@1
displayName: "Run FAKE script"
inputs:
FakeVersion: 5.6.1
FakeScript: scripts/build.fsx
WorkingDirectory: scripts
now works as expected.
Thanks for the great work!
Yes the following is now tested before publishing to the marketplace: https://dev.azure.com/fakebuild/FSProjects/_git/Test_Extensions?path=%2F.azure-pipelines.yml&version=GBmaster
Agent: Hosted Linux Preview
Task:
Error: