Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

VSCode extension should create and use .azurite folder in current working directory when no location is specified

Open hannesne opened this issue 5 years ago • 10 comments

Which service(blob, file, queue, table) does this issue concern?

NA

Which version of the Azurite was used?

v3

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

NA

What's the Node.js version?

NA

What problem was encountered?

The default lcoaiton for azurite to create it's files is the current working directory when invoked from the vscode extension. This creates a bunch of files and folders, excessively polluting the workspace. It would be better to create a .azurite directory in the current directory and put all the required files in there. This folder can then be added to .gitignore and other ignore files. It is not convenient to have to set the location to a fixed directory to reference a subfolder in the current working directory.

Steps to reproduce the issue?

NA

Have you found a mitigation/solution?

NA

hannesne avatar Feb 05 '20 03:02 hannesne

Hi @hannesne That's a great feedback! We will consider this in next major release as a breaking change. Before that, please define Azurite location in Visual Studio settings.

image

XiaoningLiu avatar Feb 09 '20 13:02 XiaoningLiu

@XiaoningLiu can you enable the use of variables such as ${workspaceFolder} for the Azure: Location setting? Currently I have to hard code it absolutely for each workspace.

JustinGrote avatar Nov 03 '20 02:11 JustinGrote

It's actually really weird that the default behaviour is to output in the current working directory, but then there's no easy way to append a path to it without hardcoding the full directory path.

My suggestion is to make it accept both absolute and relative paths. And yes, make the default to be .azurite making the extension to put all files inside the current working directory / .azurite folder as suggested by the issue opener.

empz avatar Jan 07 '21 16:01 empz

That's a valid ask and tracked on our radar. In the same time, feel free to send out PR which will speed up.

XiaoningLiu avatar Jan 08 '21 06:01 XiaoningLiu

Two more things that should perhaps be addressed as part of this:

  • support expansion of environment variables in configured path, so that we could use e.g. $TMPDIR/.azurite on macOS
  • the configured directory should be created if it does not already exist

DaRosenberg avatar Apr 08 '21 15:04 DaRosenberg

The feature request is also mentioned in https://github.com/Azure/Azurite/issues/962

blueww avatar Jul 27 '21 10:07 blueww

I took a stab at pulling together a PR to address this, as it was bugging me to pollute my git working directory with so many files. Hopefully this is acceptable and can be merged soon, but certainly open to feedback.

dpolivy avatar Sep 24 '21 17:09 dpolivy

Just chiming in. Love Azurite, but it's not pleasant how it pollutes the working directory. Would love it to align more closely with VS Code and drop it's files into a ./azurite subfolder. Any movement on PR #1061 please?

TroyWitthoeft avatar Apr 07 '22 16:04 TroyWitthoeft

That's a valid ask and tracked on our radar. In the same time, feel free to send out PR which will speed up.

@XiaoningLiu how do you mean a PR will speed it up if you just ignore it for 10 months? You asked for a PR, so how about you either accept it, or tell the author what needs to be changed?

DaRosenberg avatar Jul 18 '22 12:07 DaRosenberg

Thanks for ping. Please refer to https://github.com/Azure/Azurite/pull/1061#issuecomment-1188852899

XiaoningLiu avatar Jul 19 '22 10:07 XiaoningLiu