Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
StdIn Scripts and working directories. #102
Allow scripts run from StdIn to use the initial working directory as the parent dir for the local library, to retrieve auto included functions.
Current implementation does not allow auto including. Since the behavior is to use BIV_ScriptDir, but the script's directory is empty when run from StdIn and thus fail (non-existent library folder).
This change also lets StdIn scripts preserve A_WorkingDir as A_InitialWorkingDir since the beginning without auto-changing it to A_ScriptDir which is empty. So another script/program/caller can specify a working directory and remain valid.
One of the reasons is allow custom ExecScript functions (from the documentation) to use the same local library as the calling script.
/iLib * currently fails to detect files in local library due to reason mentioned above (BIV_ScriptDir is empty) if script is *
Thank you for the detailed explanation.
The base commit passes NULL to BIV_ScriptDir in order to determine the length prior to writing anything into the buffer. Although long paths aren't supported very well in this commit, it is possible for mFileDir to exceed MAX_PATH (with the
Commit 88f1811 (not yet merged) removes the reliance on fixed buffer sizes, but it conflicts with this pull request.
If the parent script/process may be expected to set the working directory to the base directory for the lib and other resources, perhaps it would be appropriate for A_ScriptDir to contain the initial working directory. Merely replacing
I think A_WorkingDir could only differ from A_InitialWorkingDir if #Include Directory was used to change the working directory.
Oh, didn't know you had reworked that whole section already on the test branch. Thank you. I completely missed that mFileDir line. I reverted the previous change, used what you suggested and it works fine. I'll go ahead and close this, since it seems to have brought on the gitignore changes I made too, instead of just the relevant file.
Hello, I am totally new to this community. I only ask a question once, to learn proper eticate. If I had a question, would I ask as reply to theese messages or do I/should I post to another location. Just wondering for future reference. Thanks Visionz…
On Mon, Jul 9, 2018, 4:09 PM gbln ***@***.***> wrote: Closed #102 <#102>. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#102 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Al08PMk6ktKgKfoeQ3TvqRGJ6-iOes21ks5uE-KbgaJpZM4UneyF> .