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