Use an absolute path for CompileShaders.cmd - #730
Open
bghgary wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 714b4495-258e-4645-abf7-26c17bc29d5b
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Created by Copilot on behalf of @bghgary]
Same change as microsoft/DirectXTK#660, suggested by @walbourn there.
The shader build step names the script as a bare
CompileShaders.cmd, which only resolves because Windows falls back to searching the current directory when looking up an executable. That fallback is disabled wheneverNoDefaultCurrentDirectoryInExePathis present in the environment — its presence alone is enough, the value is irrelevant — so any hardened build or automation environment fails withGenerating HLSL shaders...followed byno such file or directory.WORKING_DIRECTORYalready points atDirectXTex/Shaders, so naming the script by absolute path keeps the same intent without relying on current-directory lookup.Verified on Windows with the
Visual Studio 17 2022generator, building theDirectXTextarget:no such file or directory,error MSB8066The shader step regenerated all 14
.incfiles in each passing case, and produced none in the failing case.