Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
cdist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ungleich-public
cdist
Commits
6b4b6534
Commit
6b4b6534
authored
Feb 26, 2020
by
ssrq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[__directory] Give more precise error message when --state pre-exists
parent
2cf44c66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
cdist/conf/type/__directory/gencode-remote
cdist/conf/type/__directory/gencode-remote
+18
-4
No files found.
cdist/conf/type/__directory/gencode-remote
View file @
6b4b6534
...
...
@@ -109,10 +109,24 @@ case "$state_should" in
done
;;
pre-exists
)
if
[
"
$type
"
!=
"directory"
]
;
then
echo
"Directory
\"
$destination
\"
does not exist"
>
&2
case
$type
in
directory
)
# all good
exit
0
;;
none
)
printf
'Directory "%s" does not exist\n'
"
$destination
"
>
&2
exit
1
fi
;;
file|symlink
)
printf
'File "%s" exists and is a %s, but should be a directory\n'
"
$destination
"
"
$type
"
>
&2
exit
1
;;
*
)
printf
'File or directory "%s" is in an unknown state\n'
"
$destination
"
>
&2
exit
1
;;
esac
;;
absent
)
if
[
"
$type
"
=
"directory"
]
;
then
...
...
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