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

image path: Use new MSYS2 environment variable #668

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zhenggennj
Copy link
Contributor

The original MSYS2 environment variable MINGW_HOME is missing after a full upgrade of MSYS2. Use MSYSTEM instead.

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
@zhenggennj zhenggennj marked this pull request as ready for review April 29, 2024 03:17
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

Successfully merging this pull request may close these issues.

1 participant