Skip to content

Commit

Permalink
Merge #3966 Pause after administrator error message
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Dec 20, 2023
2 parents ae112d9 + 7a839b1 commit 9d7a95e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## v1.34.3

### Features

- [CLI] Pause after administrator error message (#3966 by: HebaruSan; reviewed: techman83)

### Bugfixes

- [Core] Oops, `HttpClient` actually sucks (#3960 by: HebaruSan; reviewed: techman83)
Expand Down Expand Up @@ -620,6 +624,7 @@ All notable changes to this project will be documented in this file.
- [GUI] Fix 'ManageKspInstances' dialog logic (#2787 by: DasSkelett; reviewed: HebaruSan)

### Internal

- [Build] Update packages (#2775 by: Olympic1; reviewed: DasSkelett, HebaruSan)
- [Build] Fix fake/clone tests on Windows (#2778 by: HebaruSan; reviewed: DasSkelett)
- [Reporting] Update issue templates (#2777 by: Olympic1; reviewed: DasSkelett, HebaruSan)
Expand Down Expand Up @@ -900,7 +905,6 @@ All notable changes to this project will be documented in this file.
- [Core] Replace colons with hyphens in archive URLs (#2290 by: HebaruSan; reviewed: techman83)
- [Core] Force-allow TLS 1.2 on .NET 4.5 (#2297 by: HebaruSan; reviewed: politas)


## v1.24.0-PRE1 (McCandless)

### Features
Expand Down
3 changes: 3 additions & 0 deletions Cmdline/Options.cs
Expand Up @@ -235,6 +235,9 @@ public virtual int Handle(GameInstanceManager manager, IUser user)
if (!AsRoot)
{
user.RaiseError(Properties.Resources.OptionsRootError);
user.RaiseMessage("");
user.RaiseMessage(Properties.Resources.OptionsPressAnyKey);
Console.ReadKey(true);
return Exit.ERROR;
}
else
Expand Down
13 changes: 11 additions & 2 deletions Cmdline/Properties/Resources.resx
Expand Up @@ -127,8 +127,17 @@
<data name="MainUnknownCommand" xml:space="preserve"><value>Unknown command, try --help</value></data>
<data name="MainMissingInstance" xml:space="preserve"><value>I don't know where a game instance is installed.
Use 'ckan instance help' for assistance in setting this.</value></data>
<data name="OptionsRootError" xml:space="preserve"><value>You are trying to run CKAN as an administrator user.
This is a bad idea and there is absolutely no good reason to do it. Please run CKAN from a user account (or use --asroot if you are feeling brave).</value></data>
<data name="OptionsRootError" xml:space="preserve"><value>
You are trying to run CKAN as an administrator user.
This gives programs unlimited power to make unauthorized changes to any part of your system.
We try our best to avoid bugs and malicious code, but you shouldn't trust us this much!

Running as administrator can also cause filesystem permissions problems, since
files installed by an administrator cannot be removed by a non-administrator.

Run CKAN as a non-administrator user to protect your system from these risks.
If you must run as an administrator, the `--asroot` parameter will bypass this check.</value></data>
<data name="OptionsPressAnyKey" xml:space="preserve"><value>Press any key to exit...</value></data>
<data name="OptionsRootWarning" xml:space="preserve"><value>Warning: CKAN is running as an administrator user!</value></data>
<data name="OptionsMonoWarning" xml:space="preserve"><value>Warning: Detected Mono {0}, recommended version is {1} or later!</value></data>
<data name="OptionsInstanceAndGameDir" xml:space="preserve"><value>--instance and --gamedir can't be specified at the same time</value></data>
Expand Down

0 comments on commit 9d7a95e

Please sign in to comment.