Comments (11)
You could also run clink set clink.update_interval 30
to make Clink only check for updates once a month. (And if you run into some kind of problem, then check the Releases page and/or run clink update
to check if a newer release fixes the problem.)
Another option is for me to publish releases less frequently. They've backed of to an average of once per week, but that's still pretty frequent. I could add an option to choose whether to install pre-release updates or release updates, and make releases infrequent. I keep thinking it's close to having releases be very infrequent, but there keeps being a slow trickle of things that need changes.
from clink.
I'm working on a more automatic approach to updates.
I have a prototype in progress, where it can be configured to install updates automatically in the background if it doesn't need to elevate (i.e. if it's installed via .zip file instead of the setup exe). And if elevation is needed, then it can pop up a prompt window asking whether to install the update or skip the update or prompt again later.
I'm working on a few last kinks before it's ready for release.
from clink.
Thank you very much, Chris.
Actually, I've enabled clink set clink.autoupdate auto
and still, my OCD (or how one calls it) just makes me want to do it anyway. Shame on me! (I'm also the guy that regularily presses Ctrl+S in Microsoft Office Word and all other application beside the fact that they do auto-save, too).
So there is really no actually meaning in me doing a clink update
. I've just written my above comment to possible improve the behavior in possibly other scenarios.
from clink.
I'm not comfortable with automatic forced updates for Clink, for several reasons. Especially when installed with AutoRun as the potential for conflicts is high.
But if you want to silently update Clink, you can do that with a very tiny script. It doesn't need to be built into Clink.
I'd be more likely to recommend turning off automatic check for updates, and just run clink update
manually once a month.
To that end, I have been thinking of adding a flag that checks for an update without doing the update, e.g. maybe clink update --check
.
from clink.
@UweKeim I forgot to mention the main reason why updates require user interaction:
If you used the setup .exe installer, then updates require elevation. It's very insecure to prompt for elevation without the user directly initiating it -- it trains users to expect random elevation prompts as legitimate, which puts them at higher risk for being victims of phishing and malware attack.
Why does the installer require elevation???
- So that it can install Clink in Program Files, which requires elevation.
- So that uninstall can be performed safely and remove Clink from AutoRun for All Users. Otherwise uninstalling could break all CMD execution for all users if
clink autorun --allusers install
has been used (note that "all users" includes the OS itself when running processes internally as LocalSystem!).
from clink.
...and OOPS, the help text for the clink update
command still talks about "automatic updates" and still claims "If [an update] is available, it is downloaded and will be installed the next time Clink is injected". But that is not how it actually works -- that text is leftover from when I had originally made updates be automatically installed, and quickly realized why that can't work. I missed removing it.
from clink.
BTW: Any donation button or something like that available?
Thank you for asking, but nope -- I don't accept donations at this time. 🙂
from clink.
I see. You're using clink update
to check for an update, instead of to apply an update. That wasn't how I'd intended/imagined for it to be used.
But it seems reasonable to use it that way. Presumably you've disabled the automatic checks for updates, and you're just periodically using clink update
to test for updates on demand?
I understand the intent behind the suggested phrasing and smiley face, but I can't quite go there: a user can have multiple copies of Clink installed, and each one needs to get updated separately. So saying "everything is up to date" can be a misleading overstatement. I won't use emoji, because they only work in certain terminals -- for example the default conhost and ConEmu and ConsoleZ cannot render emoji.
I'll look into changing the design so that it doesn't assume the intent of clink update
is to apply an update that has already been advertised to the user, and that it may instead be used to test for existence of updates.
P.S. Also, it's ambiguous: should the exit code be 1 because it failed to update because an update wasn't available? Or 0 because there wasn't an update? I think the color should match the exit code. Complicated...
from clink.
@UweKeim It's not a simple as just changing the text or color or exit code. Currently the design is that success means apply an update, and failure means don't. To make a "success but don't apply an update" state, I will have to do a somewhat significant redesign of the updater, and either do some significant refactoring or bubble more detailed directives up and down through the layers in the updater.
I'll put it on the todo list, but it's low priority and may take a while. Sorry, that kind of usage wasn't on my mind when I designed the updater. It was designed as a command you run once you've been notified that an update is available. There are a lot of things that have to change in order to make it behave the way you expected, and it will also be a breaking change if any scripts look at the exit code from clink update
. This is unfortunately not a quick or simple task.
Out of curiosity, can you share what is the usage scenario? Is there a reason not to use clink set clink.update_interval 1
and clink set clink.autoupdate auto
(or clink set clink.autoupdate prompt
)? That combination would make Clink automatically check for an update once per day and also automatically apply an update if available.
from clink.
Thank you very much for your replies, @chrisant996. Sounds all completely logical to me.
I'm very happy to use your clink on a daily basis on quite a number of machines. Always happy to see a new update being installed 🙂
BTW: Any donation button or something like that available?
from clink.
Just some nitpicking:
Calling clink update
results in:
No update available; local version v1.5.6 is not older than latest release v1.5.6.
While this is correct and tells me that I'm up to date, it is actually shown in red text, and also says "No...".
Red usually means "danger"/"error". "No" usually means an error, too.
How about changing the text to something positive in green?
Everything is up to date! Your local version v1.5.6 is the most recent release 😊
Instantly recognizable:
This would help me detecting quicker that there is no error but this is actually a good result.
from clink.
Related Issues (20)
- Disable startup message HOT 2
- how to use `os.setalias()` HOT 1
- How change shortcut for Popup Windows HOT 19
- prompt shows leftover text sometimes HOT 2
- Modify Heading HOT 5
- the new `os.setalias` ignore the flags and args HOT 1
- Where to define environment variables in CMD or Clink? HOT 2
- Question: Expanding environment variables during auto complete HOT 9
- some problems HOT 1
- No message print when an update is available HOT 2
- Show history filtered by the typed command HOT 4
- The installer is not copying any files to the newly created %LOCALAPPDAT%\clink directory HOT 3
- What's the diffs to https://github.com/mridgers/clink? HOT 2
- Request: CTRL+D to exit terminal. HOT 4
- How to stop colors? HOT 6
- Change color for cmd command? HOT 7
- things not working HOT 2
- Proper way to update via scoop or clink update? HOT 7
- The last character of a right-aligned prompt gets erased HOT 4
- Clink messes with git bash autocomplete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clink.