satiromarra / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
23 stars 3 forks source link

Upload Change Files no work in Linux #19

Closed erufenix closed 1 year ago

erufenix commented 1 year ago

Do you read the FAQ?

Describe the bug Upload Change Files does not work on Linux. But on Mac yes

The other commands work on both platforms, except this one

To Reproduce Steps to reproduce the behavior:

  1. Go to 'SFTP'
  2. Run command 'Upload Change Files'
  3. See error:

In Linux

[2023-03-22 17:21:49] [trace] run command 'Upload Changed Files'
[2023-03-22 17:21:49] 
[2023-03-22 17:21:49] ------ Upload Changed Files Result ------

But on Mac it works

[2023-03-22 17:30:06] [trace] run command 'Upload Changed Files'
[2023-03-22 17:30:06] [info] Using profile: 2
[2023-03-22 17:30:06] [trace] handle upload file for /Volumes/Develop/devs/webs/foro23/src/App/Routes.php
[2023-03-22 17:30:06] 
[2023-03-22 17:30:06] ------ Upload Changed Files Result ------
[2023-03-22 17:30:06] UPLOAD:
[2023-03-22 17:30:06] src/App/Routes.php

Desktop:

satiromarra commented 1 year ago

@erufenix That option can only be used if you are in a git repository

I just tried it on Linux and it works correctly.

https://github.com/satiromarra/vscode-sftp/wiki/Commands#sftp-upload-changed-files

erufenix commented 1 year ago

Yes I am in a repository

It's weird because on Mac it does work

changes

satiromarra commented 1 year ago

¿Qué distribución linux usas? he probando en 2 entornos, ubuntu y kubuntu, y me funciona bien.

Pasted Graphic

Voy a preparar una beta para que muestre mas información en el log.

erufenix commented 1 year ago

Linux version

erufenix@erufenix-lenovo ~> uname -a
Linux erufenix-lenovo 5.19.17-2-MANJARO #1 SMP PREEMPT_DYNAMIC Sun Nov 6 00:08:27 UTC 2022 x86_64 GNU/Linux
erufenix@erufenix-lenovo ~> 

openssh version

erufenix@erufenix-lenovo ~ [1]> sudo pacman -Qv openssh
Root      : /
Conf File : /etc/pacman.conf
DB Path   : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/  
Hook Dirs : /usr/share/libalpm/hooks/  /etc/pacman.d/hooks/  
Lock File : /var/lib/pacman/db.lck
Log File  : /var/log/pacman.log
GPG Dir   : /etc/pacman.d/gnupg/
Targets   : openssh
openssh 9.2p1-1
satiromarra commented 1 year ago

@erufenix instala esta beta

erufenix commented 1 year ago

Log output

[2023-03-23 15:46:23] [trace] run command 'Upload Changed Files'
[2023-03-23 15:46:23] [verbose] Found repository
[2023-03-23 15:46:23] [verbose] Change uri: file:///srv/http/foro23/.vscode/sftp.json
[2023-03-23 15:46:23] [trace] No fileService found! with: file:///srv/http/foro23/.vscode/sftp.json
[2023-03-23 15:46:23] [verbose] Change uri: file:///srv/http/foro23/src/App/Routes.php
[2023-03-23 15:46:23] [trace] No fileService found! with: file:///srv/http/foro23/src/App/Routes.php
[2023-03-23 15:46:23] 
[2023-03-23 15:46:23] ------ Upload Changed Files Result ------
[2023-03-23 15:46:23] [verbose] Creates: 0
[2023-03-23 15:46:23] [verbose] Uploads: 0
[2023-03-23 15:46:23] [verbose] Renames: 0
[2023-03-23 15:46:23] [verbose] Deletes: 0
[2023-03-23 15:46:23] [verbose] No items passed for CREATE
[2023-03-23 15:46:23] [verbose] No items passed for UPLOAD
[2023-03-23 15:46:23] [verbose] No items passed for RENAMED
[2023-03-23 15:46:23] [verbose] No items passed for DELETED
[2023-03-23 15:46:23] ------ Upload Changed Files End ------
satiromarra commented 1 year ago

It does not detect any "fileService":

[2023-03-23 15:46:23] [trace] No fileService found! with: file:///srv/http/foro23/src/App/Routes.php

Setting up a different "context" to the folder, the same thing happens to me:

Pasted Graphic

But setting the correct "context" works:

Pasted Graphic 1

I don't know if this is your case. How do you configure the sftp.json file?

erufenix commented 1 year ago

Is set in default value "context": "**/*",

erufenix commented 1 year ago

Solved, setting the full path

"context": "/srv/http/foro23/src",

Now to test on Mac if this configuration works

satiromarra commented 1 year ago

Is set in default value "context": "**/*",

You can also put a relative route, if the root of the project is "/srv/http/foro23/": "context": "./src/",