nokia / vscode-netconf

BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

Forcing the clone of the netconf-examples #1

Closed pedro-alexandre-ribeiro-alb closed 1 month ago

pedro-alexandre-ribeiro-alb commented 11 months ago

When I try to iniciate the netconf session in the extension it always tries to clone the https://github.com/nokia/netconf-examples repository, if the extension deems it necessary. In my case, the extension thinks that it is necessary and therefore tries to clone it.

The problem in my case is that it is trying to clone the examples to a directory that (apparently) already exists. I think that my problem arises from the fact that I'm using WSL2 (Windows Subsystem for Linux 2) and it is trying to clone the examples to a directory that doesn't make much sense since it is a hybrid between windows and linux path (forward and back slashes). Here is the extension commands log:

> git clone https://github.com/nokia/netconf-examples.git C:\Users\<username>/netconf-examples --progress
fatal: destination path 'C:\Users\<username>/netconf-examples' already exists and is not an empty directory.

My suggestion would be not to force the cloning of the examples git project. In my case, I don't need the examples project and the fact that is failing to clone it is preventing from using the extension at all.

wisotzky commented 11 months ago

Hi @pedro-g-ribeiro,

It is not implemented like this. It's the user decision to decide to clone it. The button to access the examples does only appear, if the workspace does not have the entry "netconf-examples". And even in this case, it only clones the repo if it is not cloned already. If it was cloned before, it just creates the missing workspace entry.

I guess in your case one issue is, that it uses the folder "C:\Users\". Not sure, if the username in this is replaced correctly. The extension uses the variable "git.defaultCloneDirectory" from settings.json - so you might need to adjust the value to make it work.

For your main issue that cloning is trigger by connection setup, please send the steps to reproduce it. Please also confirm that you use the latest version of this extension.

jgroom33 commented 7 months ago

This extension seems to require a restart of VSCode after installation. Then, the buttons on the taskbar appear

wisotzky commented 1 month ago

@jgroom13, please raise a new issue, to update the buttons/taskbar without restart.

@pedro-alexandre-ribeiro-alb, I would close this one... Not sure, if there is really a problem. I might consider to make the local folder configurable, if that helps.

jgroom33 commented 1 month ago

@wisotzky My original comment was not clear. The original described behavior existsed for me until I relaunched VS Code. Then, the behavior was resolved.