diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4a9ba3c..94f981f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [vNext]
-
+- Removed `EnablePasswordStdin` parameter which was without any function.
+- Changed that password parameter is now obscured when printed to output.
## [0.2.1] / 2018-11-05
- Fixed seperator between argument names and values.
## [0.2.0] / 2018-08-05
diff --git a/src/Nuke.Docker.Generator/DefinitionParser.cs b/src/Nuke.Docker.Generator/DefinitionParser.cs
index 2d19e42..c312531 100644
--- a/src/Nuke.Docker.Generator/DefinitionParser.cs
+++ b/src/Nuke.Docker.Generator/DefinitionParser.cs
@@ -111,6 +111,8 @@ private void AddProperties(DataClass settingsClass, CommandDefinition definition
private void AddProperty(DataClass settingsClass, ArgumentDefinition argument)
{
+ //Todo improve
+ if(argument.Name == "password-stdin") return;
var propertyName = argument.Name.ToPascalCase(separator: '-');
var enumerations = GetEnumerationTypes(argument);
var isEnumeration = enumerations.Any();
@@ -138,6 +140,7 @@ private void AddProperty(DataClass settingsClass, ArgumentDefinition argument)
property.Type = GetNukeType(argument);
if (property.Type == "bool") property.Format = $"--{argument.Name}";
+ if (property.Name == "Password") property.Secret = true;
settingsClass.Properties.Add(property);
}
diff --git a/src/Nuke.Docker/Generated/Docker.Generated.cs b/src/Nuke.Docker/Generated/Docker.Generated.cs
index 78e9f1f..f70354c 100644
--- a/src/Nuke.Docker/Generated/Docker.Generated.cs
+++ b/src/Nuke.Docker/Generated/Docker.Generated.cs
@@ -4385,8 +4385,6 @@ public partial class DockerLoginSettings : DockerSettings
public override string ToolPath => base.ToolPath ?? DockerTasks.DockerPath;
/// Password.
public virtual string Password { get; internal set; }
- /// Take the password from stdin.
- public virtual bool? PasswordStdin { get; internal set; }
/// Username.
public virtual string Username { get; internal set; }
/// [SERVER]
@@ -4395,8 +4393,7 @@ protected override Arguments ConfigureArguments(Arguments arguments)
{
arguments
.Add("login")
- .Add("--password {value}", Password)
- .Add("--password-stdin", PasswordStdin)
+ .Add("--password {value}", Password, secret: true)
.Add("--username {value}", Username)
.Add("{value}", Server)
.Add("{value}", GetCliSettings(), customValue: true);
@@ -27569,48 +27566,6 @@ public static DockerLoginSettings ResetPassword(this DockerLoginSettings toolSet
return toolSettings;
}
#endregion
- #region PasswordStdin
- /// Sets .
Take the password from stdin.
- [Pure]
- public static DockerLoginSettings SetPasswordStdin(this DockerLoginSettings toolSettings, bool? passwordStdin)
- {
- toolSettings = toolSettings.NewInstance();
- toolSettings.PasswordStdin = passwordStdin;
- return toolSettings;
- }
- /// Resets .
Take the password from stdin.
- [Pure]
- public static DockerLoginSettings ResetPasswordStdin(this DockerLoginSettings toolSettings)
- {
- toolSettings = toolSettings.NewInstance();
- toolSettings.PasswordStdin = null;
- return toolSettings;
- }
- /// Enables .
Take the password from stdin.
- [Pure]
- public static DockerLoginSettings EnablePasswordStdin(this DockerLoginSettings toolSettings)
- {
- toolSettings = toolSettings.NewInstance();
- toolSettings.PasswordStdin = true;
- return toolSettings;
- }
- /// Disables .
Take the password from stdin.
- [Pure]
- public static DockerLoginSettings DisablePasswordStdin(this DockerLoginSettings toolSettings)
- {
- toolSettings = toolSettings.NewInstance();
- toolSettings.PasswordStdin = false;
- return toolSettings;
- }
- /// Toggles .
Take the password from stdin.
- [Pure]
- public static DockerLoginSettings TogglePasswordStdin(this DockerLoginSettings toolSettings)
- {
- toolSettings = toolSettings.NewInstance();
- toolSettings.PasswordStdin = !toolSettings.PasswordStdin;
- return toolSettings;
- }
- #endregion
#region Username
/// Sets .
Username.
[Pure]
diff --git a/src/Nuke.Docker/specifications/Docker.json b/src/Nuke.Docker/specifications/Docker.json
index c81e74e..be9a0bb 100644
--- a/src/Nuke.Docker/specifications/Docker.json
+++ b/src/Nuke.Docker/specifications/Docker.json
@@ -4245,14 +4245,9 @@
"name": "Password",
"type": "string",
"format": "--password {value}",
+ "secret": true,
"help": "Password."
},
- {
- "name": "PasswordStdin",
- "type": "bool",
- "format": "--password-stdin",
- "help": "Take the password from stdin."
- },
{
"name": "Username",
"type": "string",