summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorJacob Helwig <jacob@puppetlabs.com>2011-06-28 18:05:49 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-06-28 18:05:49 -0700
commit8772bb7659a8586402802ce80d43fa249a4d6171 (patch)
treeff0133bdcee37fde5dfeccaeb4a479f1449a3027 /lib/puppet/application
parentcf93404e53aa32ac4a919ddd57d09ed78abfc1b5 (diff)
parent8432684e25cc82beb1f5d977dd509fd7bab3901b (diff)
downloadpuppet-8772bb7659a8586402802ce80d43fa249a4d6171.tar.gz
puppet-8772bb7659a8586402802ce80d43fa249a4d6171.tar.xz
puppet-8772bb7659a8586402802ce80d43fa249a4d6171.zip
Merge branch '2.7.x'
* 2.7.x: (23 commits) Clean up indentation, whitespace, and commented out code Remove order dependency from functions integration spec (#7956) Porting cron tests (#7956) Port resource acceptance tests (#8048) Gem install puppet no longer fails if rdoc enabled. Updating for 2.7.1 release. (#8048) Gem install puppet no longer fails if rdoc enabled. Readying for release of 2.6.9 Updating CHANGELOG for 2.7.0 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7224) Reword 'hostname was not match' error message (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate names (#7506) Organize READMEs; specify supported Ruby versions in README.md (#7506) Specify supported Ruby versions in README.md (#5641) Help text: document that puppet doc takes modulepath, manifestdir, and environment options (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction ...
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/apply.rb8
-rw-r--r--lib/puppet/application/doc.rb35
2 files changed, 30 insertions, 13 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index 3ba06d34a..5562a9b09 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -213,7 +213,13 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
configurer = Puppet::Configurer.new
report = configurer.run(:skip_plugin_download => true, :catalog => catalog)
- exit( options[:detailed_exitcodes] ? report.exit_status : 0 )
+ if not report
+ exit(1)
+ elsif options[:detailed_exitcodes] then
+ exit(report.exit_status)
+ else
+ exit(0)
+ end
rescue => detail
puts detail.backtrace if Puppet[:trace]
$stderr.puts detail.message
diff --git a/lib/puppet/application/doc.rb b/lib/puppet/application/doc.rb
index a88f27c78..65cd37da8 100644
--- a/lib/puppet/application/doc.rb
+++ b/lib/puppet/application/doc.rb
@@ -87,29 +87,40 @@ puppet doc will output a single manifest's documentation on stdout.
OPTIONS
-------
* --all:
- Output the docs for all of the reference types. In 'rdoc'
- modes, this also outputs documentation for all resources
+ Output the docs for all of the reference types. In 'rdoc' mode, this also
+ outputs documentation for all resources.
* --help:
Print this help message
* --outputdir:
- Specifies the directory where to output the rdoc
- documentation in 'rdoc' mode.
+ Used only in 'rdoc' mode. The directory to which the rdoc output should
+ be written.
* --mode:
- Determine the output mode. Valid modes are 'text', 'pdf' and
- 'rdoc'. The 'pdf' mode creates PDF formatted files in the
- /tmp directory. The default mode is 'text'. In 'rdoc' mode
- you must provide 'manifests-path'
+ Determine the output mode. Valid modes are 'text', 'pdf' and 'rdoc'. The 'pdf'
+ mode creates PDF formatted files in the /tmp directory. The default mode is
+ 'text'. In 'rdoc' mode you must provide 'manifests-path'
* --reference:
- Build a particular reference. Get a list of references by
- running 'puppet doc --list'.
+ Build a particular reference. Get a list of references by running
+ 'puppet doc --list'.
* --charset:
- Used only in 'rdoc' mode. It sets the charset used in the
- html files produced.
+ Used only in 'rdoc' mode. It sets the charset used in the html files produced.
+
+* --manifestdir:
+ Used only in 'rdoc' mode. The directory to scan for stand-alone manifests.
+ If not supplied, puppet doc will use the manifestdir from puppet.conf.
+
+* --modulepath:
+ Used only in 'rdoc' mode. The directory or directories to scan for modules.
+ If not supplied, puppet doc will use the modulepath from puppet.conf.
+
+* --environment:
+ Used only in 'rdoc' mode. The configuration environment from which
+ to read the modulepath and manifestdir settings, when reading said settings
+ from puppet.conf. Due to a known bug, this option is not currently effective.
EXAMPLE