Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifests/pear/module.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
}

$pear_exec_unless = $ensure ? {
present => "pear info ${pear_source}",
present => "pear shell-test ${pear_source} > 0",
absent => undef
}

$pear_exec_onlyif = $ensure ? {
present => undef,
absent => "pear info ${pear_source}",
absent => "pear shell-test ${pear_source} > 0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why > 0 and not > /dev/null ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that's an excellent question. There's supposed to be a literal '>' in that command line, not a redirect like there is currently.

}

$real_service = $service ? {
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/php_pear_module_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
it 'should install pear module with exec commands' do
should contain_exec('pear-Crypt-CHAP').with(
'command' => 'pear -d preferred_state=stable install pear.php.net/Crypt-CHAP',
'unless' => 'pear info pear.php.net/Crypt-CHAP | iconv -c'
'unless' => 'pear shell-test pear.php.net/Crypt-CHAP > 0'
)
end
end
Expand Down