Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Generalize the working directory configuration #173
Initially created here
referenced this pull request
Oct 11, 2018
This PR is missing an important point in the original function – in particular, the reason of the
In a freshly generated Xcode project, the Run scheme uses a temporary folder in DerivedData as the current working directory by default.
While the developer can manually set the project folder as a custom working directory, there is no way to override this when running tests in Xcode.
Other IDEs don't have to define the
If the project is not run in Xcode,
Adding extra logic for
You can run the app from the proper working directory even if it is in the
If you are using something like Supervisor, there are options to set the working directory.
In Vapor 2 there was a flag you could pass to set the working directory used. We could consider porting this to 3, but unless there's a reason why the previous two solutions wouldn't work it's probably not worth the effort.
I got the logic and even though just removing the
Fun fact about Kitura's FileKit module: you can inude it in your Vapor project and use it instead of DirectoryConfig if it suits your needs better. You could even wrap it in a custom DirectoryConfig.
Without actually knowing what the problem is (you haven't shared anything about your magical IDE or how you deploy to your server, just that something doesn't work), it's pretty hard to come up with a solution that works for all of us.