From 02466ae8da78b0ddc5298f154ee7d19d948988cc Mon Sep 17 00:00:00 2001 From: Simon Let Date: Mon, 16 Jan 2023 00:25:47 +0100 Subject: [PATCH] =?UTF-8?q?Fresh=20install=20fixes=20=F0=9F=8D=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logger/logger.go | 4 ++-- scripts/install.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/logger/logger.go b/internal/logger/logger.go index 029e834..ef25d72 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -10,9 +10,9 @@ import ( ) func New(executable string, level zapcore.Level, development string) (*zap.Logger, error) { - dataDir, err := datadir.GetPath() + dataDir, err := datadir.MakePath() if err != nil { - return nil, fmt.Errorf("error while getting resh data dir: %w", err) + return nil, fmt.Errorf("error while getting RESH data dir: %w", err) } logPath := filepath.Join(dataDir, "log.json") loggerConfig := zap.NewProductionConfig() diff --git a/scripts/install.sh b/scripts/install.sh index 6b8799c..5af7e80 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -96,7 +96,10 @@ if [ ! -f "$pid_file" ]; then fi failed_to_kill() { - echo "ERROR: Failed to kill the resh-daemon - maybe it wasn't running?" + # Do not print error during first installation + if [ -n "${__RESH_VERSION-}" ]; then + echo "ERROR: Failed to kill the resh-daemon - maybe it wasn't running?" + fi } if [ -f "$pid_file" ]; then