Add example with multiple paths
This commit is contained in:
@@ -618,6 +618,44 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"threadFlows": [
|
||||
{
|
||||
"fileLink": {
|
||||
"fileLinkPrefix": "https://github.com/meteor/meteor/blob/73b538fe201cbfe89dd0c709689023f9b3eab1ec",
|
||||
"filePath": "npm-packages/meteor-installer/config.js"
|
||||
},
|
||||
"codeSnippet": {
|
||||
"startLine": 37,
|
||||
"endLine": 41,
|
||||
"text": "\nconst meteorLocalFolder = '.meteor';\nconst meteorPath = path.resolve(rootPath, meteorLocalFolder);\n\nmodule.exports = {\n"
|
||||
},
|
||||
"highlightedRegion": {
|
||||
"startLine": 39,
|
||||
"startColumn": 20,
|
||||
"endLine": 39,
|
||||
"endColumn": 61
|
||||
}
|
||||
},
|
||||
{
|
||||
"fileLink": {
|
||||
"fileLinkPrefix": "https://github.com/meteor/meteor/blob/73b538fe201cbfe89dd0c709689023f9b3eab1ec",
|
||||
"filePath": "npm-packages/meteor-installer/install.js"
|
||||
},
|
||||
"codeSnippet": {
|
||||
"startLine": 257,
|
||||
"endLine": 261,
|
||||
"text": " if (isWindows()) {\n //set for the current session and beyond\n child_process.execSync(`setx path \"${meteorPath}/;%path%`);\n return;\n }\n"
|
||||
},
|
||||
"highlightedRegion": {
|
||||
"startLine": 259,
|
||||
"startColumn": 28,
|
||||
"endLine": 259,
|
||||
"endColumn": 62
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -83,6 +83,23 @@
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
#### Path with 2 steps
|
||||
1. [npm-packages/meteor-installer/config.js](https://github.com/meteor/meteor/blob/73b538fe201cbfe89dd0c709689023f9b3eab1ec/npm-packages/meteor-installer/config.js#L39-L39)
|
||||
<pre><code class="javascript">
|
||||
const meteorLocalFolder = '.meteor';
|
||||
const meteorPath = <strong>path.resolve(rootPath, meteorLocalFolder)</strong>;
|
||||
|
||||
module.exports = {
|
||||
</code></pre>
|
||||
|
||||
2. [npm-packages/meteor-installer/install.js](https://github.com/meteor/meteor/blob/73b538fe201cbfe89dd0c709689023f9b3eab1ec/npm-packages/meteor-installer/install.js#L259-L259)
|
||||
<pre><code class="javascript"> if (isWindows()) {
|
||||
//set for the current session and beyond
|
||||
child_process.execSync(<strong>`setx path "${meteorPath}/;%path%`</strong>);
|
||||
return;
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user