mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
Add snap/bin to /etc/environment (#755)
* Add snap/bin to /etc/environment Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
This commit is contained in:
12
images/linux/scripts/installers/complete-snap-setup.sh
Normal file
12
images/linux/scripts/installers/complete-snap-setup.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
## File: snap-environment.sh
|
||||||
|
## Desc: Update /etc/environment to include /snap/bin in PATH
|
||||||
|
## because /etc/profile.d is ignored by `--norc` shell launch option
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Source the helpers
|
||||||
|
source $HELPER_SCRIPTS/etc-environment.sh
|
||||||
|
|
||||||
|
# Update /etc/environemnt
|
||||||
|
prependEtcEnvironmentPath "/snap/bin"
|
||||||
@@ -132,6 +132,16 @@
|
|||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"scripts": [
|
||||||
|
"{{template_dir}}/scripts/installers/complete-snap-setup.sh"
|
||||||
|
],
|
||||||
|
"environment_vars": [
|
||||||
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||||
|
],
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
|
|||||||
@@ -135,6 +135,16 @@
|
|||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"scripts": [
|
||||||
|
"{{template_dir}}/scripts/installers/complete-snap-setup.sh"
|
||||||
|
],
|
||||||
|
"environment_vars": [
|
||||||
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||||
|
],
|
||||||
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
|
|||||||
Reference in New Issue
Block a user