From e0357e425b79c448c1eb1ce2cce1e9e4c7702c0c Mon Sep 17 00:00:00 2001 From: Thomas H Jones II Date: Thu, 25 Jun 2026 18:31:55 -0400 Subject: [PATCH 1/3] Fix tpl-source pathname-matching --- git-bash/files/default/{corporate.sh.tpl => corporate.sh.tmpl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename git-bash/files/default/{corporate.sh.tpl => corporate.sh.tmpl} (100%) diff --git a/git-bash/files/default/corporate.sh.tpl b/git-bash/files/default/corporate.sh.tmpl similarity index 100% rename from git-bash/files/default/corporate.sh.tpl rename to git-bash/files/default/corporate.sh.tmpl From 8f72d1e706214a03591c38a3e417b3ec4a0cec97 Mon Sep 17 00:00:00 2001 From: Thomas H Jones II Date: Fri, 26 Jun 2026 08:34:33 -0400 Subject: [PATCH 2/3] While we're here: need launcher-icon to target git-bash.exe In Windows environments (especially on secured targets like Windows Server 2022), launching the internal POSIX engine binary directly via a standard shortcut causes security token and console subsystem attachment mismatches, leading to a permission error.` --- git-bash/config/file.sls | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/git-bash/config/file.sls b/git-bash/config/file.sls index cead2a6..0f20019 100644 --- a/git-bash/config/file.sls +++ b/git-bash/config/file.sls @@ -14,15 +14,16 @@ include: {%- set install_prefix = config.get( 'install_root', 'C:\\Program Files\\Git' ) %} -{%- set gitconfig_path = [install_prefix, 'etc', 'gitconfig'] | join('\\') %} +{%- set gitconfig_path = [install_prefix, 'etc', 'gitconfig'] | + join('\\') %} {%- set profile_path = [ install_prefix, 'etc', 'profile.d', 'corporate.sh' ] | join('\\') %} -{%- set bash_target = [install_prefix, 'bin', 'bash.exe'] | join('\\') %} {%- set icon_target = [ install_prefix, 'mingw64', 'share', 'git', 'git-for-windows.ico' ] | join('\\') %} +{%- set shortcut_target = [install_prefix, 'git-bash.exe'] | join('\\') %} {%- set desktop_lnk = [ 'C:\\Users\\Public\\Desktop', 'Git Bash.lnk' @@ -59,22 +60,20 @@ Configure System Gitconfig File: Create Git Bash Desktop Shortcut: shortcut.present: - - arguments: '--login -i' - icon_index: 0 - icon_location: {{ icon_target | json }} - name: {{ desktop_lnk | json }} - require: - sls: {{ sls_package_install }} - - target: {{ bash_target | json }} + - target: {{ shortcut_target | json }} - working_dir: {{ install_prefix | json }} Create Git Bash Start Menu Shortcut: shortcut.present: - - arguments: '--login -i' - icon_index: 0 - icon_location: {{ icon_target | json }} - name: {{ start_lnk | json }} - require: - sls: {{ sls_package_install }} - - target: {{ bash_target | json }} + - target: {{ shortcut_target | json }} - working_dir: {{ install_prefix | json }} From 0c0242804f9772856502f071e882571d803caa0d Mon Sep 17 00:00:00 2001 From: Thomas H Jones II Date: Fri, 26 Jun 2026 08:37:34 -0400 Subject: [PATCH 3/3] While we're here: also need to nuke launcher-icons --- git-bash/config/clean.sls | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/git-bash/config/clean.sls b/git-bash/config/clean.sls index 41ce92b..07553a9 100644 --- a/git-bash/config/clean.sls +++ b/git-bash/config/clean.sls @@ -3,21 +3,38 @@ {#- Get the `tplroot` from `tpldir` #} {%- set tplroot = tpldir.split('/')[0] %} -{%- set sls_service_clean = tplroot ~ '.service.clean' %} {%- from tplroot ~ "/map.jinja" import mapdata as git_bash with context %} + {%- set config = git_bash.get('config') or {} %} {%- set install_prefix = config.get( 'install_root', 'C:\\Program Files\\Git' ) %} -{%- set gitconfig_path = [install_prefix, 'etc', 'gitconfig'] | join('\\') %} + +{%- set desktop_lnk = [ + 'C:\\Users\\Public\\Desktop', 'Git Bash.lnk' + ] | join('\\') %} +{%- set gitconfig_path = [install_prefix, 'etc', 'gitconfig'] | + join('\\') %} {%- set profile_path = [ install_prefix, 'etc', 'profile.d', 'corporate.sh' ] | join('\\') %} +{%- set start_lnk = [ + 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs', + 'Git Bash.lnk' + ] | join('\\') %} Remove Corporate Shell Profile: file.absent: - name: {{ profile_path | json }} +Remove Git Bash Desktop Shortcut: + file.absent: + - name: {{ desktop_lnk | json }} + +Remove Git Bash Start Menu Shortcut: + file.absent: + - name: {{ start_lnk | json }} + Remove System Gitconfig File: file.absent: - name: {{ gitconfig_path | json }}