Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
4f6c7ac2
Commit
4f6c7ac2
authored
Aug 28, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sudocmd using (don't quote command with args)
parent
40494a90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
epm-install
bin/epm-install
+2
-2
epm-sh-functions
bin/epm-sh-functions
+2
-1
test_quotes.sh
tests/test_quotes.sh
+4
-2
No files found.
bin/epm-install
View file @
4f6c7ac2
...
...
@@ -56,10 +56,10 @@ __separate_sudocmd()
shift
2
separate_installed
$@
if
[
-n
"
$pkg_noninstalled
"
]
;
then
sudocmd
"
$cmd_re
"
$pkg_noninstalled
||
return
sudocmd
$cmd_re
$pkg_noninstalled
||
return
fi
if
[
-n
"
$pkg_installed
"
]
;
then
sudocmd
"
$cmd_in
"
$pkg_installed
||
return
sudocmd
$cmd_in
$pkg_installed
||
return
fi
return
0
}
...
...
bin/epm-sh-functions
View file @
4f6c7ac2
...
...
@@ -159,7 +159,8 @@ sudocmd_foreach()
#showcmd "$@"
shift
for
pkg
in
"
$@
"
;
do
sudocmd
"
$cmd
"
$pkg
||
return
# don't quote $cmd here: it can be a command with an args
sudocmd
$cmd
$pkg
||
return
done
}
...
...
tests/test_quotes.sh
View file @
4f6c7ac2
#!/bin/sh
SUDO
=
SUDO
=
"sudo --"
#sudofunc
sudofunc
()
...
...
@@ -22,8 +22,10 @@ sudocmd()
{
showcmd
"
$SUDO
$@
"
#FIXME
$SUDO
$@
$SUDO
"
$@
"
}
sudocmd
"ls -l"
"-a -a"
sudocmd
ls
-l
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment