File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88[ ![ C++23] ( https://img.shields.io/badge/C%2B%2B-23-blue.svg )] ( https://en.cppreference.com/w/cpp/23 )
99[ ![ Module] ( https://img.shields.io/badge/module-ok-green.svg )] ( https://en.cppreference.com/w/cpp/language/modules )
1010[ ![ License] ( https://img.shields.io/badge/license-Apache_2.0-blue.svg )] ( LICENSE )
11+ [ ![ ci] ( https://github.com/mcpp-community/mcpp/actions/workflows/ci.yml/badge.svg?branch=main )] ( https://github.com/mcpp-community/mcpp/actions/workflows/ci.yml )
1112
1213| [ 文档] ( docs/zh/ ) · [ 快速开始] ( docs/zh/01-getting-started.md ) · [ mcpp.toml 指南] ( docs/zh/04-mcpp-toml.md ) · [ 示例项目] ( docs/zh/03-examples.md ) · [ 工具链管理] ( docs/zh/20-toolchains.md ) |
1314| :---:|
1415| [ 包索引 mcpp-index] ( https://mcpplibs.github.io/mcpp-index/ ) · [ 模块化库 mcpplibs] ( https://github.com/mcpplibs ) · [ 社区论坛] ( https://forum.d2learn.org/category/20 ) · [ Issues] ( https://github.com/mcpp-community/mcpp/issues ) · [ Releases] ( https://github.com/mcpp-community/mcpp/releases ) |
15- | [ ![ ci] ( https://github.com/mcpp-community/mcpp/actions/workflows/ci.yml/badge.svg?branch=main )] ( https://github.com/mcpp-community/mcpp/actions/workflows/ci.yml ) |
1616| 支持的插件 · [ mcpp-language-server(mcppls)] ( https://github.com/Sunrisepeak/mcpp-language-server ) —— C++20/23 模块语言服务器,面向 VS Code、Zed、CLion、Neovim、AI Agent(MCP)与 CI |
1717
1818<p align =" center " >
Original file line number Diff line number Diff line change 2525set -euo pipefail
2626
2727HERE=" $( cd " $( dirname " $0 " ) " && pwd) "
28+ source " $HERE /_host_path.sh"
29+
30+ # CI passes MCPP_HOME in native Windows spelling, not just Git Bash spelling.
31+ # Both must produce paths safe to interpolate into TOML basic strings.
32+ case " $( uname -s) " in
33+ MINGW* | MSYS* | CYGWIN* )
34+ [[ " $( host_path ' C:\Users\runner admin\.mcpp/registry' ) " == ' C:/Users/runner admin/.mcpp/registry' ]] || {
35+ echo " FAIL: host_path did not normalize a native Windows absolute path"
36+ exit 1
37+ }
38+ [[ " $( host_path ' C:/Users/runner admin/.mcpp/registry' ) " == ' C:/Users/runner admin/.mcpp/registry' ]] || exit 1
39+ ;;
40+ esac
41+ [[ " $( host_path ' ../relative directory' ) " == ' ../relative directory' ]] || exit 1
2842
2943# A TOML `path` key: either at the start of a line, or inside an inline table
3044# (`{ path = "..." }`). Anchoring this way is what keeps shell assignments such
Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ host_path() {
3636 # agree and Windows accepts `/` as a separator. Passing one to `cygpath -m`
3737 # would silently ANCHOR it at the current directory — which is not where the
3838 # manifest being written lives — so relative input is returned untouched.
39+ # MCPP_HOME can arrive from CI as C:\Users\...; it is absolute too.
3940 case " $1 " in
40- /* ) ;;
41+ /* | [A-Za-z]:[ \\ /] * ) ;;
4142 * ) printf ' %s' " $1 " ; return 0 ;;
4243 esac
4344 case " $( uname -s) " in
You can’t perform that action at this time.
0 commit comments