brandontosch / vscode-hiera-eyaml

7 stars 8 forks source link

Variables in publicKeyPath are not interpolated #8

Open davidolrik opened 5 years ago

davidolrik commented 5 years ago

I have the same issue with the selected text just disappearing when encrypting as described in issue #5.

I use the ${workspaceFolder} variable to reference my public key in my workspace config:

"hiera-eyaml": {
    "publicKeyPath": "${workspaceFolder:folder-a}/keys/public_key.pkcs7.pem"
}

This does not work.

Docs for using variables in in the configuration: https://code.visualstudio.com/docs/editor/variables-reference#_variables-scoped-per-workspace-folder

Using an absolute path for the publicKeyPath works.

"hiera-eyaml": {
    "publicKeyPath": "/Users/username/Projects/folder-a/keys/public_key.pkcs7.pem"
}
JvGinkel commented 5 years ago

Same issue over here, hope you can create a fix for this.

jclusso commented 5 years ago

If I was more familiar with VS extensions I'd fix. Guessing neither of you two are?

davidolrik commented 5 years ago

Until this is implemented you have to do it manually, using a regex to turn this: ${workspaceFolder:folder-a} into this /Users/username/Projects/folder-a.

jclusso commented 5 years ago

@davidolrik I'm not exactly sure what you mean by "using a regex" to do this. Could you give an example of a setting with a regex. Sorry, I'm newer to the VS Code community.

davidolrik commented 5 years ago

I was not suggesting that you use a regex in the settings, but merely that you use a regex in your code to transform ${workspaceFolder:folder-a} into /Users/username/Projects/folder-a. I.e. use the regex to extract the folder-a part and prepend it to the path of the workspace folder.

jclusso commented 5 years ago

When you say “your code”.... do you mean this extension?

davidolrik commented 5 years ago

Yes

jclusso commented 5 years ago

@davidolrik ahh I see. I thought you meant like my settings since this isn't "my code" lol. Hopefully someone who knows more about editing extensions will fix this.

RaidoRin commented 4 years ago

Any updates on this issue?

jclusso commented 4 years ago

Wondering the same myself.

On Thu, Aug 13, 2020 at 6:28 AM RaidoRin notifications@github.com wrote:

Any updates on this issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brandontosch/vscode-hiera-eyaml/issues/8#issuecomment-673397880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEX7NFYYTGJIBRQ6OINQ2DSAO545ANCNFSM4HXYWO4A .

-- Regards, Jarrett Lusso

davidolrik commented 4 years ago

There is a new issue in the main vscode repo, that have been moved to the backlog, so it is in track to be fixed in all extensions without each and every extension developer implementing their own variable substitution code.

Please go vote for it, to give it more priority in the backlog.