From b1b9854a6dec12edb934c4415b96ac88cb9ae73d Mon Sep 17 00:00:00 2001 From: Laukka Date: Sun, 12 Jan 2025 17:31:14 +0100 Subject: [PATCH] Fixed touch error --- command/touch/touch.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/touch/touch.go b/command/touch/touch.go index efb6e57..c040d7e 100644 --- a/command/touch/touch.go +++ b/command/touch/touch.go @@ -9,7 +9,7 @@ import ( ) func Touch(in input_parser.Input, env *environment.Env) { - file_path := filepath.Join(env.Path, in.Args_raw) + file_path := filepath.Join(env.Path, in.Args[0]) _, err := os.Stat(file_path) if !os.IsNotExist(err) { fmt.Print(fmt.Sprintf("File alredy exist!")) @@ -22,6 +22,3 @@ func Touch(in input_parser.Input, env *environment.Env) { } defer file.Close() } - - -