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

(1password) Fix 1Password installation regarding issue 1618 #1733

Closed
wants to merge 3 commits into from
Closed

(1password) Fix 1Password installation regarding issue 1618 #1733

wants to merge 3 commits into from

Conversation

michaelmumenthaler
Copy link
Contributor

@michaelmumenthaler michaelmumenthaler commented Oct 13, 2021

Description

I added the last line, which will execute the 1Password exe in the local Appdata with the arguments "setup" and "--silent" which will complete the installation and make it available to the user in the start menu and appwiz. This is probably not the prettiest solution but it works.

Motivation and Context

Open issue regarding this fix: #1618

How Has this Been Tested?

The installation was tested on a Windows 10 VM with the latest 1Password binary from the official source.

Screenshot (if appropriate, usually isn't needed):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Migrated package (a package has been migrated from another repository)

Checklist:

  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the chocolatey test environment.
  • The changes only affect a single package (not including meta package).

@AppVeyorBot
Copy link

❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look.

@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review

@michaelmumenthaler michaelmumenthaler changed the title Fix 1Password installation regarding issue 1618 (1password) Fix 1Password installation regarding issue 1618 Oct 13, 2021
@janlauber
Copy link

lgtm.
can somebody take another look at this, bc it would resolve the #1618 issue.

@pauby
Copy link
Member

pauby commented Oct 14, 2021

I've been trying to look at this since this morning (ie. 8 hours ago).

@@ -37,3 +37,6 @@ Start-Job -ScriptBlock { param($cache_dir)
}
} -ArgumentList ($cache_dir)
Install-ChocolateyPackage @packageArgs
if ($env:ChocolateyPackageName -ne "1password4") {
Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate as to why this is needed? The package name is 1password so it's never going to be 1password4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the AppVeyor for some reason tried it with 1password4 and failed (see the first commit in this PR and appveyor logs). Not sure what the problem is there, but i got around it that way and the checks passed with the if statement in place.

Copy link
Member

Choose a reason for hiding this comment

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

@AdmiringWorm Any thoughts on this?

Copy link

@jacktose jacktose Oct 19, 2021

Choose a reason for hiding this comment

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

“1Password 4” is a previous version of the app that is still maintained separately, because after that it was totally rewritten and significantly changed. I don't understand the context here, but FYI it's entirely possible and legit that a package called 1password4 could exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1password4 and 1password are in the same package (this package here), therefore the install and uninstall scripts need settings for 1password and 1password4 because they have different parameters. The code in question is only needed for 1password and not 1password4. But they both use the same install script. That's why this code is needed for a working installation.

Copy link
Member

Choose a reason for hiding this comment

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

While it is true that the 1password4 and 1password packages is handled in this same location in the repository here, this was originally due to them both being the same just having the exact same logic back then except for the silent arguments used (which are inserted during the update).

The end results when pushed to the community repository should only include the logic that is necessary for the package that was pushed.

Since these two packages now differ, changes would need to be made to either

  1. Remove the streams, and make them two separate packages in the repository altogether (common logic could still be shared between helper scripts).
  2. Have two install/uninstall scripts outside of the tools directory, and during the updated copy the appropriate one to the tools directory so it is used.

So while I understand why you added the if statement here, it would still not be right in terms of the end result being uploaded.

Choose a reason for hiding this comment

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

This is still an issue. I see the issue with this is down to the password4 thing. I've ran line 4. I'm not sure why the two versions are running of the same install file but does anyone know enough about this and choco's systems to make the correction @AdmiringWorm surgested?

@pauby
Copy link
Member

pauby commented Oct 14, 2021

Other than the question I had the installation and upgrade from an earlier version worked. Uninstallation is still completely broken but that's not the point of this PR.

Copy link
Member

@AdmiringWorm AdmiringWorm left a comment

Choose a reason for hiding this comment

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

@michaelmumenthaler are you in a position to make the changes necessary that I mentioned in my previous comment?

Basically, that the package installation script shouldn't combine the logic of two different packages but either be separated into two different packages, or have a copy of the necessary scripts and copy the correct one to be used during update.

@AppVeyorBot
Copy link

❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look.

@github-actions
Copy link

Dear contributor,

As this PR seems to have been inactive for 30 days after changes or additional information
was requested, I've automatically closed it.
If you feel the changes are still valid, please re-open the PR once all changes or additional information
that was requested has been added.
Thank you for your contribution.

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

Successfully merging this pull request may close these issues.

(1password) install appears to succeed, but program is not functional
7 participants