Skip to content

Commit 8db17e4

Browse files
committed
(maint) Fix lint issues
1 parent b208aff commit 8db17e4

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

plans/util/retrieve_and_upload.pp

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@
2929
|-HEREDOC
3030
# lint:endignore
3131

32-
$operating_system = run_task('peadm::os_identification', 'local://localhost')
33-
$os_string =$operating_system.first.value['_output']
32+
$operating_system = run_task('peadm::os_identification', 'local://localhost')
33+
$os_string =$operating_system.first.value['_output']
3434

35-
if 'windows' in $os_string {
36-
$exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost')
37-
if $exists.first['stdout'].chomp == 'false' {
38-
run_task('peadm::download', 'local://localhost',
39-
source => $source,
40-
path => $local_path,
41-
)
42-
}
35+
if 'windows' in $os_string {
36+
$exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost')
37+
if $exists.first['stdout'].chomp == 'false' {
38+
run_task('peadm::download', 'local://localhost',
39+
source => $source,
40+
path => $local_path,
41+
)
42+
}
4343

44-
$result_size = run_task('peadm::filesize', 'local://localhost',
45-
path => $local_path,
46-
)
47-
$local_size = $result_size.first.value['_output']
48-
} else {
49-
$exists = without_default_logging() || {
50-
run_command("test -e '${local_path}'", 'local://localhost',
51-
_catch_errors => true,
52-
).ok()
53-
}
54-
unless $exists {
55-
run_task('peadm::download', 'local://localhost',
56-
source => $source,
57-
path => $local_path,
44+
$result_size = run_task('peadm::filesize', 'local://localhost',
45+
path => $local_path,
5846
)
59-
}
47+
$local_size = $result_size.first.value['_output']
48+
} else {
49+
$exists = without_default_logging() || {
50+
run_command("test -e '${local_path}'", 'local://localhost',
51+
_catch_errors => true,
52+
).ok()
53+
}
54+
unless $exists {
55+
run_task('peadm::download', 'local://localhost',
56+
source => $source,
57+
path => $local_path,
58+
)
59+
}
6060

61-
$local_size = run_task('peadm::filesize', 'local://localhost',
62-
path => $local_path,
63-
).first['size']
64-
}
61+
$local_size = run_task('peadm::filesize', 'local://localhost',
62+
path => $local_path,
63+
).first['size']
64+
}
6565

6666
$targets_needing_file = run_task('peadm::filesize', $nodes,
6767
path => $upload_path,

tasks/validate_rbac_token.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def execute!
2929
body = JSON.parse(resp.body)
3030
case resp.code
3131
when '401', '403'
32-
puts "#{resp.code} #{body['kind']}: \nCheck your API token at #{token_file}. " +
33-
"An alternate token file can be specified using the token_file param. \n\n" +
34-
"See https://www.puppet.com/docs/pe/latest/rbac_token_auth_intro for more details. \n"
32+
puts "#{resp.code} #{body['kind']}: \nCheck your API token at #{token_file}. \
33+
An alternate token file can be specified using the token_file param. \n\n\
34+
See https://www.puppet.com/docs/pe/latest/rbac_token_auth_intro for more details. \n"
3535
else
3636
puts "Error validating token: #{resp.code} #{body['kind']}"
3737
puts body['msg']
@@ -65,7 +65,6 @@ def https_object(uri:)
6565

6666
https
6767
end
68-
6968
end
7069

7170
# Run the task unless an environment flag has been set, signaling not to. The

0 commit comments

Comments
 (0)