image path: Use new MSYS2 environment variable #668
Open
zhenggennj wants to merge 4 commits intoiamcco:masterfrom
Open
image path: Use new MSYS2 environment variable #668zhenggennj wants to merge 4 commits intoiamcco:masterfrom
zhenggennj wants to merge 4 commits intoiamcco:masterfrom
Conversation
1) Issue background
a) on 'mingw32' terminal
b) executable 'vim' in /usr/bin
c) executable 'node' in /mingw32/bin.
d) plugin 'markdow-preview.nvim' in ~/.vim/plugged
e) app/route.js:68 fileDir is a unix path
f) image missing in browser preview
2) Issue fixing
add code to app/route.js:
a) extract info from environment variable MINGW_HOME
b) prefixing imgPath with sth. like "E:\msys64\"
3) No issue alternative
a) on 'ucrt64' terminal
b) executable 'nvim' in /ucrt64/bin
c) executable 'node' in /ucrt64/bin
d) plugin 'markdown-preview.nvim' in ~/.vim/plugged
e) app/route.js:68 fileDir is a win path
f) image ok in browser preview
1) Based on info from MINGW_HOME is error-prone. Maybe the document is located on a windisk other than that of msys2 installation. 2) use 'cygpath.exe' to convert unix-like 'fileDir' to win-like one. 3) the conversion operation must follow the first assignment of 'fileDir'.
After a full upgrade of MSYS2 system, there is no environment variable MINGW_HOME any more. It is replaced by MSYSTEM in this revision.
Manually update the reference to environment MSYS2 variable
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.
The original MSYS2 environment variable MINGW_HOME is missing after a full upgrade of MSYS2. Use MSYSTEM instead.