gotify / gotify/cli

./cli.json on windows executable resolves to current working directory instead of path relative to .exe.

Ouverte
#3 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
a:feature good first issue
Langage dominant
Go
Étoiles
588
Forks
73
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

After running `init` and selecting to save the configs to `./cli.json` the executable is unable to find the config file unless the console working directory is the executable's directory. In fact, I believe the `./cli.json` file is saved to whichever working directory you have active when `init`is run.

Not sure if this is the intended functionality but I expected it to save to the same directory as the `.exe` file and to always be loaded from there regardless of my working directory.

As a temporary fix I created a batch script that I am using to call the cli app from anywhere with the expected behavior. I'm posting it here in case anyone finds this thread and needs an immediate fix.

```
gotify.bat
-----------------
@echo off
pushd %~dp0
Call %~dp0\gotify-cli-windows-amd64.exe p -q %*
popd
```
The scripts needs to be placed on the same directory as the executable to work as is.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par le flux init et le chemin de chargement de la configuration de l’exécutable, en vous concentrant sur la manière dont ./cli.json est résolu sous Windows. Reproduisez le comportement depuis un autre répertoire de travail et confirmez que la configuration est enregistrée et chargée relativement au répertoire du .exe une fois le problème corrigé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
go
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.