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

No such file or directory; failed to install file 'themes\'. #681

Closed
MagicAndre1981 opened this issue Oct 13, 2024 · 21 comments
Closed

No such file or directory; failed to install file 'themes\'. #681

MagicAndre1981 opened this issue Oct 13, 2024 · 21 comments
Labels
bug Something isn't working

Comments

@MagicAndre1981
Copy link

MagicAndre1981 commented Oct 13, 2024

I made the update to from 1.6.21 to 1.7.0 and saw the message during update:

C:\WINDOWS\system32>clink update
Checking latest version...
Downloading latest release v1.7.0...
Expanding zip file...
No such file or directory; failed to install file 'themes\'.

Update worked, I'm now at 1.7.0, but I'm a bit confused by this message.

@chrisant996
Copy link
Owner

Aw man. I tried to test all the things thoroughly. I must have missed something specifically about the zip update mechanism.

I'll look into it tonight.

You can try installing with the setup.exe program and that should work.

@chrisant996 chrisant996 added the bug Something isn't working label Oct 14, 2024
@chrisant996
Copy link
Owner

Sigh. The updater has a bug that doesn't support subdirectories under the Clink program directory. And Clink v1.7.0 now includes a themes\ subdirectory there.

The updater updated everything except the new themes\ subdirectory and the *.clinktheme and *.clinkprompt files in it. Which are the main feature of v1.7.0.

For now, you can go to the latest release and manually extract the themes\ subdirectory from the .zip file there. Then create a themes\ subdirectory under Clink's program directory, and copy into it the files from the .zip file's themes\ subdirectory.

I'll work on solving the updater issue.

@harshn05
Copy link

harshn05 commented Oct 14, 2024

I still faced the same issue with v1.7.0 --> v1.7.1 live upgrade
themes-bug

@chrisant996
Copy link
Owner

Yes. In testing, it worked. But in the live update it's still hitting a specific problem that I already fixed during the testing. I'm investigating, and deleting v1.7.1.

@chrisant996
Copy link
Owner

It's working fine with test builds. But not with release builds.

It deletes the files in a directory, and deletes the directory.
And then in release builds the directory is still present, but in test builds it's properly gone.

It almost seems like it might be a timing issue with antivirus software.

@chrisant996
Copy link
Owner

I've added logging and retries.

This is very frustrating for me, because I'm doing detailed and time consuming tests.
It's not like I'm publishing untested changes.

Here comes attempt number 3... 😕

@atamasco
Copy link

atamasco commented Oct 14, 2024

Still the same error (Windows 11, admin user):

D:\>clink update
Checking latest version...
Downloading latest release v1.7.2...
Expanding zip file...
No such file or directory; failed to install file 'themes\'.

@d4k0
Copy link

d4k0 commented Oct 14, 2024

I can also confirm the same error under Windows 10:

clink update
Checking latest version...
Downloading latest release v1.7.2...
Expanding zip file...
No such file or directory; failed to install file 'themes\'.

@chrisant996
Copy link
Owner

chrisant996 commented Oct 14, 2024

v1.7.2 solves the problem. But you have to update twice: run clink update and it fails to install the themes\ directory, but if you start a new Clink session and run clink update again then it's able to install the themes\ directory.

I think maybe v1.7.1 had already solved the problem: The first update fails; there's no way around that. Because when updating from version X to version Y, the updater code that's running is from version X. I forgot to explain that two updates are necessary to finish the update.

@chrisant996
Copy link
Owner

chrisant996 commented Oct 14, 2024

v1.7.2 solves the problem. _**But you have to update twice: run clink update and it fails to install the themes\ directory, but if you start a new Clink session and run clink update again then it's able to install the themes\ directory.

I think maybe v1.7.1 had already solved the problem: The first update fails; there's no way around that. Because when updating from version X to version Y, the updater code that's running is from version X. I forgot to explain that two updates are necessary to finish the update.

@d4k0 You have to start a new Clink session after the initial error, and then it will finish the update. There's nothing I can do to prevent the initial error -- the code for that is already on everyone's machines.

@d4k0
Copy link

d4k0 commented Oct 14, 2024

Ah, the second run of clink update solves the problem, in the notification email from Github the note was not there. Thank you!

@chrisant996
Copy link
Owner

The initial update reports an error. Start a new Clink session after the error, and it will finish the update successfully.

There's nothing that can be done to prevent the initial error because it's running the updater code that's already on your computer from the older copy of Clink. I can't even add a clarifying message. Because the updater code is always from the previous version of Clink -- it's never from the new version. 😓

@MagicAndre1981
Copy link
Author

thanks, second update worked:

Microsoft Windows [Version 10.0.22631.4317]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

Clink v1.7.2.f5e99f
Copyright (c) 2012-2018 Martin Ridgers
Portions Copyright (c) 2020-2024 Christopher Antos
https://github.com/chrisant996/clink

Clink v1.7.2 needs to be updated again to install the themes directory.
- To apply the update, run 'clink update'.
- To view the release notes, visit the Releases page:
  https://github.com/chrisant996/clink/releases

C:\Windows\System32>clink update
Checking latest version...
Expanding zip file...
Updating registry keys...

Updated Clink to v1.7.2.

To view the release notes, visit the Releases page:
  https://github.com/chrisant996/clink/releases

C:\Windows\System32>

@atamasco
Copy link

Confirmed, runnig the update a 2nd time works. 👍

@wbpayne22902
Copy link

For some reason on my machine, although the update completed the second time successfully, I still cannot use any of the new color themes or prompts. I have stock settings so it can't be any lua script interfering.

@chrisant996
Copy link
Owner

For some reason on my machine, although the update completed the second time successfully, I still cannot use any of the new color themes or prompts. I have stock settings so it can't be any lua script interfering.

For tracking purposes I've moved that to a new separate issue #682, since it's not related to this issue.

@chrisant996
Copy link
Owner

Closing this now, as the issue is fixed and mitigated, and running clink update again finishes the update successfully.

@plutonium-239

This comment was marked as duplicate.

@chrisant996

This comment was marked as duplicate.

@plutonium-239

This comment was marked as duplicate.

@chrisant996
Copy link
Owner

chrisant996 commented Oct 21, 2024

Moved three comments to #692 for tracking purposes because they're a separate issue (hid the comments here as "duplicate").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants