From 088b78e39249c7786ec1b84e7eb444fdb3964b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 5 May 2023 11:35:24 +0200 Subject: [PATCH 1/2] Docs: Reference `Process.executable_path` at `PROGRAM_NAME` --- src/kernel.cr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kernel.cr b/src/kernel.cr index bf7dc037862d..b8ff08eef24e 100644 --- a/src/kernel.cr +++ b/src/kernel.cr @@ -42,6 +42,12 @@ STDOUT = IO::FileDescriptor.from_stdio(1) STDERR = IO::FileDescriptor.from_stdio(2) # The name, the program was called with. +# +# The result is may be a relative or absolute path (including symbolic links), +# just the command name or the empty string. +# +# See `Process.executable_path` for a more convenient alternative that always +# returns the absolute real path to the executable file (if it exists). PROGRAM_NAME = String.new(ARGV_UNSAFE.value) # An array of arguments passed to the program. From 2aeb14121fa4e1994019fb951c220b25854e267e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 5 May 2023 18:05:20 +0200 Subject: [PATCH 2/2] Update src/kernel.cr Co-authored-by: Quinton Miller --- src/kernel.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel.cr b/src/kernel.cr index b8ff08eef24e..7bca29cef605 100644 --- a/src/kernel.cr +++ b/src/kernel.cr @@ -43,7 +43,7 @@ STDERR = IO::FileDescriptor.from_stdio(2) # The name, the program was called with. # -# The result is may be a relative or absolute path (including symbolic links), +# The result may be a relative or absolute path (including symbolic links), # just the command name or the empty string. # # See `Process.executable_path` for a more convenient alternative that always