air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.35k stars 771 forks source link

No such file or directory when project path has space #546

Open jarielbalberona opened 3 months ago

jarielbalberona commented 3 months ago

I know that having spaces in folder names is weird but I have no problem with this setup with my previous projects and stacks.

/bin/sh: /Users/jariel/Documents/projects/1.: No such file or directory

I've fixed this by removing space in my folder name, from /1. dev/ to /1.dev/.

luisgarciaalanis commented 3 months ago

you can also esape the space?

like so -> /1.\ dev

jarielbalberona commented 3 months ago

I've no control over the path when I run the "air".

mateusfmello commented 3 months ago

My directory structure has spaces because I use client company names to organize files, so some clients have names containing the space character.

In other words, I also have the same problem and I can't use the Air because of it.

I see that because the operating system allows the use of the space character in the directory path, Air should also be compatible with this way of naming files and directories.

Error presented:

➜  app air

  __    _   ___  
 / /\  | | | |_) 
/_/--\ |_| |_| \_ v1.51.0, built with Go go1.22.1

watching .
watching cmd
watching cmd/cli
watching internal
watching internal/domain
watching internal/domain/entity
watching internal/infra
watching internal/infra/clienteHttp
watching internal/infra/fila
watching internal/usecase
watching internal/utils
watching internal/utils/env
watching internal/utils/gestao
!exclude tmp
building...
no Go files in /home/XXXX/YYYY/work/Name Client/app
running...
/bin/sh: 1: /home/XXXX/YYYY/work/Name: not found