unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 35b076d57213da16059f0859bc928fd94b630a7c 1191 bytes (raw)
name: gnu/packages/patches/kakoune-fix-bash-path.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -22,30 +22,7 @@
 
 ShellManager::ShellManager()
 {
-    // Get a guaranteed to be POSIX shell binary
-    {
-        auto size = confstr(_CS_PATH, 0, 0);
-        String path; path.resize(size-1, 0);
-        confstr(_CS_PATH, path.data(), size);
-        for (auto dir : StringView{path} | split<StringView>(':'))
-        {
-            String candidate = format("{}/sh", dir);
-            struct stat st;
-            if (stat(candidate.c_str(), &st))
-                continue;
-
-            bool executable = (st.st_mode & S_IXUSR)
-                            | (st.st_mode & S_IXGRP)
-                            | (st.st_mode & S_IXOTH);
-            if (S_ISREG(st.st_mode) and executable)
-            {
-                m_shell = std::move(candidate);
-                break;
-            }
-        }
-        if (m_shell.empty())
-            throw runtime_error{format("unable to find a posix shell in {}", path)};
-    }
+    m_shell = "__BASH_PATH__/bin/sh";
 
     // Add Kakoune binary location to the path to guarantee that %sh{ ... }
     // have access to the kak command regardless of if the user installed it

debug log:

solving 35b076d57 ...
found 35b076d57 in https://yhetil.org/guix-devel/87y3yykov6.fsf@zancanaro.id.au/

applying [1/1] https://yhetil.org/guix-devel/87y3yykov6.fsf@zancanaro.id.au/
diff --git a/gnu/packages/patches/kakoune-fix-bash-path.patch b/gnu/packages/patches/kakoune-fix-bash-path.patch
new file mode 100644
index 000000000..35b076d57

1:10: trailing whitespace.
 
1:38: trailing whitespace.
 
Checking patch gnu/packages/patches/kakoune-fix-bash-path.patch...
Applied patch gnu/packages/patches/kakoune-fix-bash-path.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 35b076d57213da16059f0859bc928fd94b630a7c	gnu/packages/patches/kakoune-fix-bash-path.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).