Closed ctf0 closed 1 year ago
@ctf0 for me the first example works fine
can you give a detailed and exact example, what you did from your side?
maybe it have to do with the insiders version am using, am not sure, if there is a way to debug this, plz tell me.
@ctf0
how does your settings look like and where is the JS file stored?
global user settings
"ego.power-tools": {
"startup": [
// doesnt work
{
"script": "startup.js"
},
// show information msg, but cmnd give error
// Running shell command 'npm install' ... [FAILED: '[Error] 'Command failed: npm install
{
"command": "npm install",
"if": " !$fs.existsSync( $v['workspaceRoot'] + '/node_modules' ) "
}
]
},
startup.js ~/.vscode-powertools/startup.js
exports.execute = async (args) => {
const vscode = args.require('vscode');
await refreshProjects(vscode)
};
async function refreshProjects(vscode) { await vscode.commands.executeCommand('projectManager.refreshProjects')
vscode.window.showInformationMessage(
'Project Manager: Refresh Projects'
);
}
also keep getting this in the output
Initializing extension ...
[xxx] Initializing workspace ...
Running shell command '' ... [FAILED: '[TypeError] 'The argument 'file' cannot be empty. Received '''']
[xxx] 🧾 startups.onstartup(1) :: The argument 'file' cannot be empty. Received ''
[xxx] Executed all startups.
[xxx] Workspace initialized.
Extension has been initialized.
Your network configuration:
================================
Hostname: xxx.local
Network interfaces:
- ....
with settings of
"ego.power-tools": {
"startup": [
{
"script": "startup.js"
}
]
},
i've followed the example of https://github.com/egomobile/vscode-powertools/wiki/Buttons but nothing works