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

Invalid name argument error after upgrading Inspec #1588

Closed
vahidn83 opened this issue Mar 21, 2017 · 4 comments
Closed

Invalid name argument error after upgrading Inspec #1588

vahidn83 opened this issue Mar 21, 2017 · 4 comments

Comments

@vahidn83
Copy link

Description

After upgrading the Inspec on my Windows server, I get the following error:

Invalid name argument to packages resource, please use a "string" or /regexp/

InSpec and Platform Version

I upgrade from Inspec 1.14.1 to 1.16.1 on Wiindows Server 2008 R2.

Replication Case

I run the following command on the Windows box to inspect a Linux box:
> inspec exec core.rb -t ssh://root:123@host

@adamleff
Copy link
Contributor

@vahidn83 thank you for submitting this issue, and our apologies that you're experiencing a problem.

Unfortunately, I'm unable to replicate the issue with the information provided. Can you please provide an exact control/test that you are using that fails, and can you please provide the full output of inspec exec?

Thank you!

@chris-rock
Copy link
Contributor

@vahidn83 Be aware that we have a package and packages resource. packages is not supported on Windows yet. Are the tests the same after the upgrade?

@vahidn83
Copy link
Author

@chris-rock I'm not inspecting anything on Windows, I just use Windows for auditing Linux boxes.
@adamleff I think I found the root cause of the issue. The issue is that I have a function named 'packages' and apparently it has conflict with an internal method with the same name. However, I'm not sure why I'd never faced such issue on the previous Inspec versions.

@adamleff
Copy link
Contributor

@vahidn83 I'm not sure either, as the packages resource did exist in 1.14.1 according to git history. I'm glad you found the issue. I'll be closing this issue, but please let us know if we need to reopen for further assistance.

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

3 participants