Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative path issues with fake script compilation to .fake folder. #946

Closed
uladz-zubrycki opened this issue Sep 10, 2015 · 0 comments
Closed

Comments

@uladz-zubrycki
Copy link

Not sure, If it's a problem of fake or mine but nevertheless.
Suppose we've got next directories structure
$/
    .nuget/
    packages/
        Fake/
    cmd/
        run.cmd
    fsx/
        run.fsx

Where run.cmd is a fake script bootstrapper, which downloads fake to the packages folder with use of .nuget/nuget.exe and starts ../fsx/run.fsx then.
And run.fsx has next content

#I @"../packages/" 
#r @"FAKE/tools/FakeLib.dll"

open Fake
open System.IO
Directory.SetCurrentDirectory (__SOURCE_DIRECTORY__)

Target "Default" (fun _ -> 
     trace "Running default target"
)

RunTargetOrDefault "Default"

After executing the script, empty folder .fake will be created inside cmd folder, while compilated FSI-ASSEMBLY.dll will be saved inside fsx one. Also, after all the targets will be completed successfully, we will getSystem.IO.DirectoryNotFoundException inside Fake.FSIHelper.runFAKEScriptWithFsiArgsAndREdirectMessages at FSIHelper.fs#340

Everything will be ok without Directory.SetCurrentDirectrory(__SOURCE_DIRECTORY__), but I want all the pathes used in script to be relative to the fsx files itself and not the cmd bootstrapper.

khanage added a commit to khanage/FAKE that referenced this issue Oct 7, 2015
fixes fsprojects#946 - relative paths seem to be confused between the path of the fake.exe and the path of the project.

I'm happy for someone who knows more than I do to do a deeper dive, but this seems adequate for what I assume is a temporary location.
@forki forki closed this as completed in #969 Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant