From b05ca7aabe40804cc973c89c0a78358e36cb9dd8 Mon Sep 17 00:00:00 2001 From: Recca Tsai Date: Sun, 8 Jul 2018 01:13:33 +0800 Subject: [PATCH] fix unix path error --- src/Console/Commands/Vi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/Commands/Vi.php b/src/Console/Commands/Vi.php index fba3745..d3d07bb 100644 --- a/src/Console/Commands/Vi.php +++ b/src/Console/Commands/Vi.php @@ -51,7 +51,7 @@ public function handle() $path = $this->argument('path'); $text = $this->option('text'); $root = function_exists('base_path') === true ? base_path() : getcwd(); - $path = trim($root, '/').'/'.$path; + $path = rtrim($root, '/').'/'.$path; if (is_null($text) === false) { $this->files->put($path, $text);