Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP does not extract if directory does not exist #401

Open
ShawnHardwick opened this issue Feb 17, 2020 · 0 comments
Open

ZIP does not extract if directory does not exist #401

ShawnHardwick opened this issue Feb 17, 2020 · 0 comments

Comments

@ShawnHardwick
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.4.3
  • Ruby: 2.5.3
  • Distribution: Windows Server 2016
  • Module version: 3.2.1

How to reproduce (e.g Puppet code you use)

$sql_install_zip = "C:\\temp\\sql_2016.zip"
$sql_install_extract_dir = "C:\\temp\\sql_2016"
archive::nexus { $sql_install_zip:
    gav          => $installer['gav'],
    repository   => $installer['repository'],
    packaging    => $installer['packaging'],
    mode         => '670',
    extract      => true,
    extract_path => $sql_install_extract_dir,
  }

What are you seeing

The Archive (and internally File resource) are marked as present and successful, but the ZIP file is never extracted. Running in debug mode, the debug statement below is never output:
Puppet.debug("Archive extracting #{@file} in #{path}: #{cmd}")

No SystemCallError exception is being thrown

What behavior did you expect instead

One of two options:

  • SystemCallError Ruby exception should be thrown if the directory doesn't exist
  • Extract function should not rely on the extract directory existing. In the case of 7-zip, it will create the extract directory for you.

Output log

Any additional information you'd like to impart

Ruby isn't my strong suit, but looking at the code I figured it would throw a SystemCallError exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant