Cannot find vsicons.settings.json when use --user-data-dir by CLI
See original GitHub issue- I’m sure this issue is not a duplicate.
- More info:
Related, but not solve my problem: https://github.com/vscode-icons/vscode-icons/issues/1101 https://github.com/vscode-icons/vscode-icons/issues/1123
I was using cmder
, and make vsCode portable by using this command:
@cmd /c "start %cmder_root%\bin\vsCode\Code.exe --user-data-dir %cmder_root%\bin\vsCode\data\userData --extensions-dir %cmder_root%\bin\vsCode\data\extension %* %cmder_root%\bin\vsCode\data\code.code-workspace"
and it seems that your plugin cannot detect my custom user-data-dir
passed by CLI.
It throws out like this:
[Extension Host] Activating extension `robertohuertasm.vscode-icons` failed: ENOENT: no such file or directory, open 'C:\Users\xiaze\AppData\Roaming\Code\User\vsicons.settings.json'
[Extension Host] Here is the error stack: Error: ENOENT: no such file or directory, open 'C:\Users\xiaze\AppData\Roaming\Code\User\vsicons.settings.json'
at Object.fs.openSync (fs.js:584:18)
at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
at Object.fs.writeFileSync (fs.js:1326:33)
at SettingsManager.setState (I:\bin\vsCode\data\extension\robertohuertasm.vscode-icons-7.23.0\out\src\settings\settingsManager.js:75:12)
at SettingsManager.updateStatus (I:\bin\vsCode\data\extension\robertohuertasm.vscode-icons-7.23.0\out\src\settings\settingsManager.js:82:14)
at initialize (I:\bin\vsCode\data\extension\robertohuertasm.vscode-icons-7.23.0\out\src\index.js:22:25)
at activate (I:\bin\vsCode\data\extension\robertohuertasm.vscode-icons-7.23.0\out\src\index.js:39:5)
at Function.t._callActivateOptional (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:721:592)
at Function.t._callActivate (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:721:271)
at i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:720:336
at Object.g [as _notify] (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:69:572)
at Object.enter (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:72:924)
at n.Class.derive._oncancel._run (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:719)
at n.Class.derive._oncancel._completed (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:160)
at c (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:654)
at K.then.o.(anonymous function) (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:868)
at Object.g [as _notify] (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:69:572)
at Object.enter (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:72:924)
at n.Class.derive._oncancel._run (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:719)
at n.Class.derive._oncancel._completed (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:160)
at c (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:654)
at K.then.o.(anonymous function) (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:77:868)
at Object.g [as _notify] (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:69:572)
at Object.enter (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:72:924)
at n.Class.derive._oncancel._run (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:719)
at n.Class.derive._oncancel._completed (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:74:160)
at e.resolveOk (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:525:85)
at e._receiveReply (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:598:227)
at e._receiveOneMessage (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:597:524)
at i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:596:384
at i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:599:463
at i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:88:119
at e.fire (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:89:496)
at Socket.<anonymous> (i:\bin\vsCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:145:1008)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20)
激活扩展“robertohuertasm.vscode-icons”失败: ENOENT: no such file or directory, open 'C:\Users\xiaze\AppData\Roaming\Code\User\vsicons.settings.json'。
When I look into the source code, I found that:
https://github.com/vscode-icons/vscode-icons/blob/master/src/utils/index.ts#L23 https://github.com/vscode-icons/vscode-icons/blob/master/src/settings/settingsManager.ts#L27
It was looking into %APPDATA%
instead of %cmder_root%\bin\vsCode\data\userData
I passed to vsCode.exe.
Is there any way to solve this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Need Env Variables for DataDir and ExtensionDir #49306
Currently, we can only get a few env variables when refer to the ... Cannot find vsicons.settings.json when use --user-data-dir by CLI ......
Read more >VSCode Settings.json is missing - Stack Overflow
json is user settings, not workspace settings, workspace settings are located under the folder you have opened at <folder>\.vscode\settings.json ...
Read more >VSCode settings.json | vs code settings.json - YouTube
0:00 How to open settings. json in VSCode?0:10 Hit Ctrl + , (comma)0:20 Type settings. json in search settings box0:30 Click on the...
Read more >How To Open settings.json Mac | Visual Studio Code - YouTube
How to find settings. json file in VSCode on Mac? VSCode settings. json not working or not applying on Mac? In this tutorial...
Read more >How to open user settings.json file in VSCode - YouTube
tutorial the fastest way to open your user settings. json file in vscode will be shown.00:00 How to ... Your browser can't play...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope. We are currently not supporting this. Thought, we will look into providing this feature, if possible.
Unfortunately
API
request forCLI
usage is still pending (https://github.com/Microsoft/vscode/issues/49306).