Azurite vscode extension settings do not respect relative paths
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
### Which service(blob, file, queue, table) does this issue concern?
Blob
### Which version of the Azurite was used?
3.12.0
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
Visual Studio Code Extension
### What's the Node.js version?
14.16.0
### What problem was encountered?
Azurite errors when setting the cert and key settings to point at files in the current directory. For example if your settings were:

for local development, with certs created using `mkcert` as the docs suggest, then Azurite will fail to start with a `ENOENT: no such file or directory, open '.\127.0.0.1.pem'` error. This is the same with setting the path to `.\127.0.0.1.pem`, as it is with `./127.0.0.1.pem`, and `${workspaceFolder}/127.0.0.1.pem`.
### Steps to reproduce the issue?
- Create new certs in a directory with `mkcert 127.0.0.1`
- Set Azurite to point at `127.0.0.1.pem` for the cert and `127.0.0.1-key.pem` for the key
- Enable debug logging
- Try to start Azurite
- Open debug log to see below stack trace
```
Azurite Blob Service starts failed with error: ENOENT: no such file or directory, open '.\127.0.0.1.pem' Error: ENOENT: no such file or directory, open '.\127.0.0.1.pem'
at Object.openSync (fs.js:476:3)
at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
at Object.readFileSync (fs.js:377:35)
at Object.e.readFileSync (electron/js2c/asar_bundle.js:5:8643)
at BlobConfiguration.getCert (c:\Users\jcfie\.vscode\extensions\azurite.azurite-3.12.0\dist\src\common\ConfigurationBase.js:41:30)
at new BlobServer (c:\Users\jcfie\.vscode\extensions\azurite.azurite-3.12.0\dist\src\blob\BlobServer.js:51:63)
at VSCServerManagerBlob.createImpl (c:\Users\jcfie\.vscode\extensions\azurite.azurite-3.12.0\dist\src\common\VSCServerManagerBlob.js:35:23)
at async VSCServerManagerClosedState.start (c:\Users\jcfie\.vscode\extensions\azurite.azurite-3.12.0\dist\src\common\VSCServerManagerClosedState.js:6:9)
at async VSCServerManagerBlob.start (c:\Users\jcfie\.vscode\extensions\azurite.azurite-3.12.0\dist\src\common\VSCServerManagerBase.js:38:26)
```
### Have you found a mitigation/solution?
Absolute paths work, but make it more difficult to distribute settings! Appreciate this might not really be fixable, just wanted to raise an issue incase it was something that could be sorted.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.