Comments (4)
I see. Let's just wait for @alanhamlett input.
from vscode-wakatime.
First, this package vscode-wakatime is treating the option's entire string as one program to run:
vscode-wakatime/src/options.ts
Lines 240 to 246 in e0a7f36
child_process.spawn treats the first argument as the program's executable name, and only treats it a shell command (ie. interpreted by sh with sh syntax) if the shell
option was true, which it isn't.
Second, that line in the documentation is quite misleading, at least in regards to wakatime-cli
's behavior. In reality the string is not a shell command, it is a space-separated list of an executable and its arguments. This extension should probably mimick this behavior.
Edit: I thought this was wakatime/vscode-wakatime. Corrected.
Edit: Oh, it was moved.
from vscode-wakatime.
Hi @vorburger that's not the way it should be used api_key_vault_cmd = /usr/bin/echo hi
. So, instead you might replace with
api_key_vault_cmd = pass any_defined_key
from vscode-wakatime.
@gandarez with vscode-wakatime
, that will not work - not even the pass
command would work. vscode-wakatime
treats the whole value as one executable name (including the spaces).
This is a problem in vscode-wakatime
, specifically here:
public async getApiKeyFromVaultCmd(): Promise<string> {
try {
const apiKeyCmd = await this.getSettingAsync<string>('settings', 'api_key_vault_cmd');
if (!apiKeyCmd) return '';
const options = Desktop.buildOptions();
const proc = child_process.spawn(apiKeyCmd, options);
where it treats the whole string as one executable. I've filed #386 to fix it.
The /usr/bin/echo hi
is just fact a placeholder to refer to some command returning a proper API key.
from vscode-wakatime.
Related Issues (20)
- Wakatime not updating HOT 9
- Working offline (102); HOT 3
- Error fetching `wakatime-cli` HOT 3
- Linking work on Untitled documents to project/file
- Backoff rate limiter set too far in future, 2 years HOT 11
- Wakatime: working offline... HOT 2
- Status bar event listeners HOT 1
- VSCode doesn't "see" an `api_key` when using `import_cfg` and still always prompts for _WakaTime API key_
- Wakatime plugin always pops up the window requiring me to fill in my API key HOT 2
- LiteIDE Plugin HOT 1
- WakaTime doesn't work on WSL while using the extension locally on Windows HOT 3
- [Extension Host] [WakaTime][WARN] Failed to download https://github.com/wakatime/wakatime-cli/releases/latest/download/wakatime-cli-windows-amd64.zip
- Wakatime not working: Failed to download wakatime-cli HOT 4
- Open social media and other links on profile page in a new tab HOT 1
- Wakatime Error .wakatime.log HOT 1
- Failed fetching today from api HOT 4
- Live Shared Fix Counter
- WakaTime Initializing forever in Remote-WSL2 HOT 2
- WakaTime: working offline... coding activity will sync next time we are online HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-wakatime.