From c1486e5d41096e6de899c1e8f2ce5b4fe82e2cee Mon Sep 17 00:00:00 2001 From: mlorbetske Date: Sat, 8 Jul 2017 01:36:06 -0700 Subject: [PATCH] Add chmod post-action --- setup.sh | 7 +- .../LocalizableStrings.Designer.cs | 301 ++--- .../LocalizableStrings.resx | 1101 +++++++++-------- .../ChmodPostActionProcessor.cs | 67 + 4 files changed, 778 insertions(+), 698 deletions(-) create mode 100644 src/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs diff --git a/setup.sh b/setup.sh index 0016067c56b..20e9fe615da 100755 --- a/setup.sh +++ b/setup.sh @@ -32,7 +32,6 @@ echo Done! if [ ! -L /usr/local/bin/setup.sh ]; then echo "Creating symbolic link /usr/local/bin/setup.sh -> $REPOROOT/setup.sh" sudo ln -s "$REPOROOT/setup.sh" /usr/local/bin/setup.sh -chmod 777 "$REPOROOT/setup.sh" fi echo You can now use setup.sh from anywhere to rebuild dotnet new3 @@ -40,7 +39,6 @@ echo You can now use setup.sh from anywhere to rebuild dotnet new3 if [ ! -L /usr/local/bin/harderreset.sh ]; then echo "Creating symbolic link /usr/local/bin/harderreset.sh -> $REPOROOT/harderreset.sh" sudo ln -s "$REPOROOT/harderreset.sh" /usr/local/bin/harderreset.sh -chmod 777 "$REPOROOT/harderreset.sh" fi echo You can now use harderreset.sh from anywhere to delete dotnet new3 artifacts @@ -48,9 +46,12 @@ echo You can now use harderreset.sh from anywhere to delete dotnet new3 artifact if [ ! -L /usr/local/bin/dotnet-new3 ]; then echo "Creating symbolic link /usr/local/bin/dotnet-new3 -> $REPOROOT/dev/dotnet-new3.sh" sudo ln -s "$REPOROOT/dev/dotnet-new3.sh" /usr/local/bin/dotnet-new3 -chmod 777 "$REPOROOT/dev/dotnet-new3.sh" fi +chmod +x "$REPOROOT/setup.sh" +chmod +x "$REPOROOT/harderreset.sh" +chmod +x "$REPOROOT/dev/dotnet-new3.sh" + cd $CWD echo dotnet new3 is ready! diff --git a/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs b/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs index 58ff5054a9b..fa36ffcbc4b 100644 --- a/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs +++ b/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs @@ -11,8 +11,8 @@ namespace Microsoft.TemplateEngine.Cli { using System; using System.Reflection; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -24,15 +24,15 @@ namespace Microsoft.TemplateEngine.Cli { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class LocalizableStrings { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal LocalizableStrings() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -46,7 +46,7 @@ internal LocalizableStrings() { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -60,7 +60,7 @@ internal LocalizableStrings() { resourceCulture = value; } } - + /// /// Looks up a localized string similar to Failed to add project(s) {0} to solution file {1}. /// @@ -69,7 +69,7 @@ public static string AddProjToSlnPostActionFailed { return ResourceManager.GetString("AddProjToSlnPostActionFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add.. /// @@ -78,7 +78,7 @@ public static string AddProjToSlnPostActionNoProjFiles { return ResourceManager.GetString("AddProjToSlnPostActionNoProjFiles", resourceCulture); } } - + /// /// Looks up a localized string similar to Adding project reference(s) to solution file. Running dotnet sln {0} add {1}. /// @@ -87,7 +87,7 @@ public static string AddProjToSlnPostActionRunning { return ResourceManager.GetString("AddProjToSlnPostActionRunning", resourceCulture); } } - + /// /// Looks up a localized string similar to Successfully added /// project(s): {0} @@ -98,7 +98,7 @@ public static string AddProjToSlnPostActionSucceeded { return ResourceManager.GetString("AddProjToSlnPostActionSucceeded", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to determine which solution file to add the reference to.. /// @@ -107,7 +107,7 @@ public static string AddProjToSlnPostActionUnresolvedSlnFile { return ResourceManager.GetString("AddProjToSlnPostActionUnresolvedSlnFile", resourceCulture); } } - + /// /// Looks up a localized string similar to Adding a package reference. Running dotnet add {0} package {1}. /// @@ -116,7 +116,7 @@ public static string AddRefPostActionAddPackageRef { return ResourceManager.GetString("AddRefPostActionAddPackageRef", resourceCulture); } } - + /// /// Looks up a localized string similar to Adding a package reference. Running dotnet add {0} package {1} --version {2}. /// @@ -125,7 +125,7 @@ public static string AddRefPostActionAddPackageRefWithVersion { return ResourceManager.GetString("AddRefPostActionAddPackageRefWithVersion", resourceCulture); } } - + /// /// Looks up a localized string similar to Adding a project reference. Running dotnet add {0} reference {1}. /// @@ -134,7 +134,7 @@ public static string AddRefPostActionAddProjectRef { return ResourceManager.GetString("AddRefPostActionAddProjectRef", resourceCulture); } } - + /// /// Looks up a localized string similar to Failed to add reference {0} to project file {1}. /// @@ -143,7 +143,7 @@ public static string AddRefPostActionFailed { return ResourceManager.GetString("AddRefPostActionFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it.. /// @@ -152,7 +152,7 @@ public static string AddRefPostActionFrameworkNotSupported { return ResourceManager.GetString("AddRefPostActionFrameworkNotSupported", resourceCulture); } } - + /// /// Looks up a localized string similar to Add reference action is not configured correctly in the template.. /// @@ -161,7 +161,7 @@ public static string AddRefPostActionMisconfigured { return ResourceManager.GetString("AddRefPostActionMisconfigured", resourceCulture); } } - + /// /// Looks up a localized string similar to No references configured to be added to project.. /// @@ -170,7 +170,7 @@ public static string AddRefPostActionNoRefConfigured { return ResourceManager.GetString("AddRefPostActionNoRefConfigured", resourceCulture); } } - + /// /// Looks up a localized string similar to Project files found:. /// @@ -179,7 +179,7 @@ public static string AddRefPostActionProjFileListHeader { return ResourceManager.GetString("AddRefPostActionProjFileListHeader", resourceCulture); } } - + /// /// Looks up a localized string similar to Successfully added /// reference: {0} @@ -190,7 +190,7 @@ public static string AddRefPostActionSucceeded { return ResourceManager.GetString("AddRefPostActionSucceeded", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to determine which project file to add the reference to.. /// @@ -199,7 +199,7 @@ public static string AddRefPostActionUnresolvedProjFile { return ResourceManager.GetString("AddRefPostActionUnresolvedProjFile", resourceCulture); } } - + /// /// Looks up a localized string similar to Adding reference type {0} is not supported.. /// @@ -208,7 +208,7 @@ public static string AddRefPostActionUnsupportedRefType { return ResourceManager.GetString("AddRefPostActionUnsupportedRefType", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias. /// @@ -217,7 +217,7 @@ public static string Alias { return ResourceManager.GetString("Alias", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias '{0}' is a template short name, and therefore cannot be aliased.. /// @@ -226,7 +226,7 @@ public static string AliasCannotBeShortName { return ResourceManager.GetString("AliasCannotBeShortName", resourceCulture); } } - + /// /// Looks up a localized string similar to After expanding aliases, the command is: /// dotnet {0}. @@ -236,7 +236,7 @@ public static string AliasCommandAfterExpansion { return ResourceManager.GetString("AliasCommandAfterExpansion", resourceCulture); } } - + /// /// Looks up a localized string similar to Successfully created alias named '{0}' with value '{1}'. /// @@ -245,7 +245,7 @@ public static string AliasCreated { return ResourceManager.GetString("AliasCreated", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias not created. It would have created an alias cycle, resulting in infinite expansion.. /// @@ -254,7 +254,7 @@ public static string AliasCycleError { return ResourceManager.GetString("AliasCycleError", resourceCulture); } } - + /// /// Looks up a localized string similar to Command is invalid after expanding aliases.. /// @@ -263,7 +263,7 @@ public static string AliasExpandedCommandParseError { return ResourceManager.GetString("AliasExpandedCommandParseError", resourceCulture); } } - + /// /// Looks up a localized string similar to Error expanding aliases on input params.. /// @@ -272,7 +272,7 @@ public static string AliasExpansionError { return ResourceManager.GetString("AliasExpansionError", resourceCulture); } } - + /// /// Looks up a localized string similar to Creates, updates, or deletes the named alias. The alias value is the remainder of the command. If extra args files are specified, the alias value includes their expansions.. /// @@ -281,7 +281,7 @@ public static string AliasHelp { return ResourceManager.GetString("AliasHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias Name. /// @@ -290,7 +290,7 @@ public static string AliasName { return ResourceManager.GetString("AliasName", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias names can only contain letters, numbers, underscores, and periods.. /// @@ -299,7 +299,7 @@ public static string AliasNameContainsInvalidCharacters { return ResourceManager.GetString("AliasNameContainsInvalidCharacters", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias not created. The input was invalid.. /// @@ -308,7 +308,7 @@ public static string AliasNotCreatedInvalidInput { return ResourceManager.GetString("AliasNotCreatedInvalidInput", resourceCulture); } } - + /// /// Looks up a localized string similar to Successfully removed alias named '{0}' whose value was '{1}'.. /// @@ -317,7 +317,7 @@ public static string AliasRemoved { return ResourceManager.GetString("AliasRemoved", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to remove alias '{0}'. It did not exist.. /// @@ -326,7 +326,7 @@ public static string AliasRemoveNonExistentFailed { return ResourceManager.GetString("AliasRemoveNonExistentFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to All Aliases:. /// @@ -335,7 +335,7 @@ public static string AliasShowAllAliasesHeader { return ResourceManager.GetString("AliasShowAllAliasesHeader", resourceCulture); } } - + /// /// Looks up a localized string similar to Unknown alias name '{0}'. ///Run 'dotnet {1} --show-aliases' with no args to show all aliases.. @@ -345,7 +345,7 @@ public static string AliasShowErrorUnknownAlias { return ResourceManager.GetString("AliasShowErrorUnknownAlias", resourceCulture); } } - + /// /// Looks up a localized string similar to Successfully updated alias named '{0}' to value '{1}'.. /// @@ -354,7 +354,7 @@ public static string AliasUpdated { return ResourceManager.GetString("AliasUpdated", resourceCulture); } } - + /// /// Looks up a localized string similar to Alias Value. /// @@ -363,7 +363,7 @@ public static string AliasValue { return ResourceManager.GetString("AliasValue", resourceCulture); } } - + /// /// Looks up a localized string similar to First argument of an alias value must begin with a letter or digit.. /// @@ -372,7 +372,7 @@ public static string AliasValueFirstArgError { return ResourceManager.GetString("AliasValueFirstArgError", resourceCulture); } } - + /// /// Looks up a localized string similar to Do not allow scripts to run. /// @@ -381,7 +381,7 @@ public static string AllowScriptsNoChoice { return ResourceManager.GetString("AllowScriptsNoChoice", resourceCulture); } } - + /// /// Looks up a localized string similar to Ask before running each script. /// @@ -390,7 +390,7 @@ public static string AllowScriptsPromptChoice { return ResourceManager.GetString("AllowScriptsPromptChoice", resourceCulture); } } - + /// /// Looks up a localized string similar to Allow scripts to run. /// @@ -399,7 +399,7 @@ public static string AllowScriptsYesChoice { return ResourceManager.GetString("AllowScriptsYesChoice", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to determine the desired template from the input template name: {0}.. /// @@ -408,7 +408,7 @@ public static string AmbiguousInputTemplateName { return ResourceManager.GetString("AmbiguousInputTemplateName", resourceCulture); } } - + /// /// Looks up a localized string similar to The specified extra args file does not exist: {0}.. /// @@ -417,7 +417,7 @@ public static string ArgsFileNotFound { return ResourceManager.GetString("ArgsFileNotFound", resourceCulture); } } - + /// /// Looks up a localized string similar to Extra args file {0} is not formatted properly.. /// @@ -426,7 +426,7 @@ public static string ArgsFileWrongFormat { return ResourceManager.GetString("ArgsFileWrongFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to Assembly. /// @@ -435,7 +435,7 @@ public static string Assembly { return ResourceManager.GetString("Assembly", resourceCulture); } } - + /// /// Looks up a localized string similar to Author: {0}. /// @@ -444,7 +444,7 @@ public static string Author { return ResourceManager.GetString("Author", resourceCulture); } } - + /// /// Looks up a localized string similar to Invalid format for input locale: "{0}". Example valid formats: [en] [en-US].. /// @@ -453,7 +453,7 @@ public static string BadLocaleError { return ResourceManager.GetString("BadLocaleError", resourceCulture); } } - + /// /// Looks up a localized string similar to Could not install "{0}".. /// @@ -462,7 +462,7 @@ public static string BadPackageSpec { return ResourceManager.GetString("BadPackageSpec", resourceCulture); } } - + /// /// Looks up a localized string similar to Change. /// @@ -471,7 +471,7 @@ public static string Change { return ResourceManager.GetString("Change", resourceCulture); } } - + /// /// Looks up a localized string similar to Checking for updates for {0}.... /// @@ -480,7 +480,7 @@ public static string CheckingForUpdates { return ResourceManager.GetString("CheckingForUpdates", resourceCulture); } } - + /// /// Looks up a localized string similar to Template Instantiation Commands for .NET Core CLI. /// @@ -489,7 +489,7 @@ public static string CommandDescription { return ResourceManager.GetString("CommandDescription", resourceCulture); } } - + /// /// Looks up a localized string similar to Command failed.. /// @@ -498,7 +498,7 @@ public static string CommandFailed { return ResourceManager.GetString("CommandFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Output from command: ///{0}. @@ -508,7 +508,7 @@ public static string CommandOutput { return ResourceManager.GetString("CommandOutput", resourceCulture); } } - + /// /// Looks up a localized string similar to Command succeeded.. /// @@ -517,7 +517,7 @@ public static string CommandSucceeded { return ResourceManager.GetString("CommandSucceeded", resourceCulture); } } - + /// /// Looks up a localized string similar to Configured Value: {0}. /// @@ -526,7 +526,7 @@ public static string ConfiguredValue { return ResourceManager.GetString("ConfiguredValue", resourceCulture); } } - + /// /// Looks up a localized string similar to Continue?. /// @@ -535,7 +535,7 @@ public static string ContinueQuestion { return ResourceManager.GetString("ContinueQuestion", resourceCulture); } } - + /// /// Looks up a localized string similar to Couldn't find item to install: "{0}".. /// @@ -544,7 +544,7 @@ public static string CouldNotFindItemToInstall { return ResourceManager.GetString("CouldNotFindItemToInstall", resourceCulture); } } - + /// /// Looks up a localized string similar to Could not find something to uninstall called '{0}'.. /// @@ -553,7 +553,7 @@ public static string CouldntUninstall { return ResourceManager.GetString("CouldntUninstall", resourceCulture); } } - + /// /// Looks up a localized string similar to Creates an alias for the specified template.. /// @@ -562,7 +562,7 @@ public static string CreateAliasHelp { return ResourceManager.GetString("CreateAliasHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates whether to create a directory for the generated content.. /// @@ -571,7 +571,7 @@ public static string CreateDirectoryHelp { return ResourceManager.GetString("CreateDirectoryHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Template "{0}" could not be created. ///{1}. @@ -581,7 +581,7 @@ public static string CreateFailed { return ResourceManager.GetString("CreateFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to The template "{0}" was created successfully.. /// @@ -590,7 +590,7 @@ public static string CreateSuccessful { return ResourceManager.GetString("CreateSuccessful", resourceCulture); } } - + /// /// Looks up a localized string similar to Current configuration:. /// @@ -599,7 +599,7 @@ public static string CurrentConfiguration { return ResourceManager.GetString("CurrentConfiguration", resourceCulture); } } - + /// /// Looks up a localized string similar to Default: {0}. /// @@ -608,7 +608,7 @@ public static string DefaultValue { return ResourceManager.GetString("DefaultValue", resourceCulture); } } - + /// /// Looks up a localized string similar to Delete. /// @@ -617,7 +617,7 @@ public static string Delete { return ResourceManager.GetString("Delete", resourceCulture); } } - + /// /// Looks up a localized string similar to Description: {0}. /// @@ -626,7 +626,7 @@ public static string Description { return ResourceManager.GetString("Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Creating this template will make changes to existing files:. /// @@ -635,7 +635,7 @@ public static string DestructiveChangesNotification { return ResourceManager.GetString("DestructiveChangesNotification", resourceCulture); } } - + /// /// Looks up a localized string similar to Displays help for this command.. /// @@ -644,7 +644,7 @@ public static string DisplaysHelp { return ResourceManager.GetString("DisplaysHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to After expanding the extra args files, the command is: /// dotnet {0}. @@ -654,7 +654,7 @@ public static string ExtraArgsCommandAfterExpansion { return ResourceManager.GetString("ExtraArgsCommandAfterExpansion", resourceCulture); } } - + /// /// Looks up a localized string similar to Specifies a file containing additional parameters.. /// @@ -663,7 +663,7 @@ public static string ExtraArgsFileHelp { return ResourceManager.GetString("ExtraArgsFileHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Factory. /// @@ -672,7 +672,7 @@ public static string Factory { return ResourceManager.GetString("Factory", resourceCulture); } } - + /// /// Looks up a localized string similar to Forces content to be generated even if it would change existing files.. /// @@ -681,7 +681,7 @@ public static string ForcesTemplateCreation { return ResourceManager.GetString("ForcesTemplateCreation", resourceCulture); } } - + /// /// Looks up a localized string similar to Generators. /// @@ -690,7 +690,7 @@ public static string Generators { return ResourceManager.GetString("Generators", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} cannot be created in the target location.. /// @@ -699,7 +699,7 @@ public static string GenericPlaceholderTemplateContextError { return ResourceManager.GetString("GenericPlaceholderTemplateContextError", resourceCulture); } } - + /// /// Looks up a localized string similar to Getting ready.... /// @@ -708,7 +708,7 @@ public static string GettingReady { return ResourceManager.GetString("GettingReady", resourceCulture); } } - + /// /// Looks up a localized string similar to Id. /// @@ -717,7 +717,7 @@ public static string Id { return ResourceManager.GetString("Id", resourceCulture); } } - + /// /// Looks up a localized string similar to "{0}" could not be installed. ///{1}.. @@ -727,7 +727,7 @@ public static string InstallFailed { return ResourceManager.GetString("InstallFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Installs a source or a template pack.. /// @@ -736,7 +736,7 @@ public static string InstallHelp { return ResourceManager.GetString("InstallHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Installing updates.... /// @@ -745,7 +745,7 @@ public static string InstallingUpdates { return ResourceManager.GetString("InstallingUpdates", resourceCulture); } } - + /// /// Looks up a localized string similar to "{0}" was installed successfully.. /// @@ -754,7 +754,7 @@ public static string InstallSuccessful { return ResourceManager.GetString("InstallSuccessful", resourceCulture); } } - + /// /// Looks up a localized string similar to Invalid input switch:. /// @@ -763,7 +763,7 @@ public static string InvalidInputSwitch { return ResourceManager.GetString("InvalidInputSwitch", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} {1} /// The default value '{1}' is not a valid value for {0}.. @@ -773,7 +773,7 @@ public static string InvalidParameterDefault { return ResourceManager.GetString("InvalidParameterDefault", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} {1} /// '{1}' is not a valid value for {0} ({2}).. @@ -783,7 +783,7 @@ public static string InvalidParameterDetail { return ResourceManager.GetString("InvalidParameterDetail", resourceCulture); } } - + /// /// Looks up a localized string similar to Error: Invalid values for parameter(s) {0} for template {1}.. /// @@ -792,7 +792,7 @@ public static string InvalidParameterValues { return ResourceManager.GetString("InvalidParameterValues", resourceCulture); } } - + /// /// Looks up a localized string similar to Error: Invalid parameter(s):. /// @@ -801,7 +801,7 @@ public static string InvalidTemplateParameterValues { return ResourceManager.GetString("InvalidTemplateParameterValues", resourceCulture); } } - + /// /// Looks up a localized string similar to Language. /// @@ -810,7 +810,7 @@ public static string Language { return ResourceManager.GetString("Language", resourceCulture); } } - + /// /// Looks up a localized string similar to Specifies the language of the template to create.. /// @@ -819,7 +819,7 @@ public static string LanguageParameter { return ResourceManager.GetString("LanguageParameter", resourceCulture); } } - + /// /// Looks up a localized string similar to Lists templates containing the specified name. If no name is specified, lists all templates.. /// @@ -828,7 +828,7 @@ public static string ListsTemplates { return ResourceManager.GetString("ListsTemplates", resourceCulture); } } - + /// /// Looks up a localized string similar to The locale to use.. /// @@ -837,7 +837,7 @@ public static string LocaleHelp { return ResourceManager.GetString("LocaleHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Mandatory parameter {0} missing for template {1}.. /// @@ -846,7 +846,7 @@ public static string MissingRequiredParameter { return ResourceManager.GetString("MissingRequiredParameter", resourceCulture); } } - + /// /// Looks up a localized string similar to Mount Point Factories. /// @@ -855,7 +855,7 @@ public static string MountPointFactories { return ResourceManager.GetString("MountPointFactories", resourceCulture); } } - + /// /// Looks up a localized string similar to Mount Points. /// @@ -864,7 +864,7 @@ public static string MountPoints { return ResourceManager.GetString("MountPoints", resourceCulture); } } - + /// /// Looks up a localized string similar to Template name is the only allowed argument. Invalid argument: {0}.. /// @@ -873,7 +873,7 @@ public static string MultipleArgsSpecifiedError { return ResourceManager.GetString("MultipleArgsSpecifiedError", resourceCulture); } } - + /// /// Looks up a localized string similar to Multiple values specified for single value parameter: {0}.. /// @@ -882,7 +882,7 @@ public static string MultipleValuesSpecifiedForSingleValuedParameter { return ResourceManager.GetString("MultipleValuesSpecifiedForSingleValuedParameter", resourceCulture); } } - + /// /// Looks up a localized string similar to The name for the output being created. If no name is specified, the name of the current directory is used.. /// @@ -891,7 +891,7 @@ public static string NameOfOutput { return ResourceManager.GetString("NameOfOutput", resourceCulture); } } - + /// /// Looks up a localized string similar to (No Items). /// @@ -900,7 +900,7 @@ public static string NoItems { return ResourceManager.GetString("NoItems", resourceCulture); } } - + /// /// Looks up a localized string similar to (No Parameters). /// @@ -909,7 +909,7 @@ public static string NoParameters { return ResourceManager.GetString("NoParameters", resourceCulture); } } - + /// /// Looks up a localized string similar to No Primary Outputs to restore.. /// @@ -918,7 +918,7 @@ public static string NoPrimaryOutputsToRestore { return ResourceManager.GetString("NoPrimaryOutputsToRestore", resourceCulture); } } - + /// /// Looks up a localized string similar to No templates matched the input template name: {0}.. /// @@ -927,7 +927,7 @@ public static string NoTemplatesMatchName { return ResourceManager.GetString("NoTemplatesMatchName", resourceCulture); } } - + /// /// Looks up a localized string similar to No updates were found.. /// @@ -936,7 +936,7 @@ public static string NoUpdates { return ResourceManager.GetString("NoUpdates", resourceCulture); } } - + /// /// Looks up a localized string similar to Options:. /// @@ -945,7 +945,7 @@ public static string Options { return ResourceManager.GetString("Options", resourceCulture); } } - + /// /// Looks up a localized string similar to Option variant {0} for canonical {1} was already defined for canonical {2}.. /// @@ -954,7 +954,7 @@ public static string OptionVariantAlreadyDefined { return ResourceManager.GetString("OptionVariantAlreadyDefined", resourceCulture); } } - + /// /// Looks up a localized string similar to Location to place the generated output.. /// @@ -963,7 +963,7 @@ public static string OutputPath { return ResourceManager.GetString("OutputPath", resourceCulture); } } - + /// /// Looks up a localized string similar to Overwrite. /// @@ -972,7 +972,7 @@ public static string Overwrite { return ResourceManager.GetString("Overwrite", resourceCulture); } } - + /// /// Looks up a localized string similar to Parameter {0} ({1}) must be given a value.. /// @@ -981,7 +981,7 @@ public static string ParameterMissingValue { return ResourceManager.GetString("ParameterMissingValue", resourceCulture); } } - + /// /// Looks up a localized string similar to Parameter names must start with -- or -.. /// @@ -990,7 +990,7 @@ public static string ParameterNamePrefixError { return ResourceManager.GetString("ParameterNamePrefixError", resourceCulture); } } - + /// /// Looks up a localized string similar to Parameter name {0} cannot be used for multiple purposes.. /// @@ -999,7 +999,7 @@ public static string ParameterReuseError { return ResourceManager.GetString("ParameterReuseError", resourceCulture); } } - + /// /// Looks up a localized string similar to Parameter {0} was specified multiple times, including with the flag {1}.. /// @@ -1008,7 +1008,7 @@ public static string ParameterSpecifiedMultipleTimes { return ResourceManager.GetString("ParameterSpecifiedMultipleTimes", resourceCulture); } } - + /// /// Looks up a localized string similar to Parent. /// @@ -1017,7 +1017,7 @@ public static string Parent { return ResourceManager.GetString("Parent", resourceCulture); } } - + /// /// Looks up a localized string similar to Actual command: {0}. /// @@ -1026,7 +1026,7 @@ public static string PostActionCommand { return ResourceManager.GetString("PostActionCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to Description: {0}. /// @@ -1035,7 +1035,7 @@ public static string PostActionDescription { return ResourceManager.GetString("PostActionDescription", resourceCulture); } } - + /// /// Looks up a localized string similar to Post action failed.. /// @@ -1044,7 +1044,7 @@ public static string PostActionFailedInstructionHeader { return ResourceManager.GetString("PostActionFailedInstructionHeader", resourceCulture); } } - + /// /// Looks up a localized string similar to Manual instructions: {0}. /// @@ -1053,7 +1053,7 @@ public static string PostActionInstructions { return ResourceManager.GetString("PostActionInstructions", resourceCulture); } } - + /// /// Looks up a localized string similar to Invalid input "{0}". Please enter one of (Y|N).. /// @@ -1062,7 +1062,7 @@ public static string PostActionInvalidInputRePrompt { return ResourceManager.GetString("PostActionInvalidInputRePrompt", resourceCulture); } } - + /// /// Looks up a localized string similar to Template is configured to run the following action:. /// @@ -1071,7 +1071,7 @@ public static string PostActionPromptHeader { return ResourceManager.GetString("PostActionPromptHeader", resourceCulture); } } - + /// /// Looks up a localized string similar to Do you want to run this action (Y|N)?. /// @@ -1080,7 +1080,7 @@ public static string PostActionPromptRequest { return ResourceManager.GetString("PostActionPromptRequest", resourceCulture); } } - + /// /// Looks up a localized string similar to Processing post-creation actions.... /// @@ -1089,7 +1089,7 @@ public static string ProcessingPostActions { return ResourceManager.GetString("ProcessingPostActions", resourceCulture); } } - + /// /// Looks up a localized string similar to Doesn't output any status information.. /// @@ -1098,7 +1098,7 @@ public static string QuietModeHelp { return ResourceManager.GetString("QuietModeHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Rerun the command and pass --force to accept and create.. /// @@ -1107,7 +1107,7 @@ public static string RerunCommandAndPassForceToCreateAnyway { return ResourceManager.GetString("RerunCommandAndPassForceToCreateAnyway", resourceCulture); } } - + /// /// Looks up a localized string similar to Restore failed.. /// @@ -1116,7 +1116,7 @@ public static string RestoreFailed { return ResourceManager.GetString("RestoreFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Restore succeeded.. /// @@ -1125,7 +1125,7 @@ public static string RestoreSucceeded { return ResourceManager.GetString("RestoreSucceeded", resourceCulture); } } - + /// /// Looks up a localized string similar to Run dotnet {0} --help for usage information.. /// @@ -1134,7 +1134,7 @@ public static string RunHelpForInformationAboutAcceptedParameters { return ResourceManager.GetString("RunHelpForInformationAboutAcceptedParameters", resourceCulture); } } - + /// /// Looks up a localized string similar to Running command '{0}'.... /// @@ -1143,7 +1143,7 @@ public static string RunningCommand { return ResourceManager.GetString("RunningCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to Running 'dotnet restore' on {0}.... /// @@ -1152,7 +1152,7 @@ public static string RunningDotnetRestoreOn { return ResourceManager.GetString("RunningDotnetRestoreOn", resourceCulture); } } - + /// /// Looks up a localized string similar to Short Name. /// @@ -1161,7 +1161,7 @@ public static string ShortName { return ResourceManager.GetString("ShortName", resourceCulture); } } - + /// /// Looks up a localized string similar to Displays the value of the named alias, or all aliases if no name is specified.. /// @@ -1170,7 +1170,7 @@ public static string ShowAliasesHelp { return ResourceManager.GetString("ShowAliasesHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Shows all templates.. /// @@ -1179,7 +1179,7 @@ public static string ShowsAllTemplates { return ResourceManager.GetString("ShowsAllTemplates", resourceCulture); } } - + /// /// Looks up a localized string similar to Filters templates based on available types. Predefined values are "project", "item" or "other".. /// @@ -1188,7 +1188,7 @@ public static string ShowsFilteredTemplates { return ResourceManager.GetString("ShowsFilteredTemplates", resourceCulture); } } - + /// /// Looks up a localized string similar to Tags. /// @@ -1197,7 +1197,7 @@ public static string Tags { return ResourceManager.GetString("Tags", resourceCulture); } } - + /// /// Looks up a localized string similar to The template to instantiate.. /// @@ -1206,7 +1206,7 @@ public static string TemplateArgumentHelp { return ResourceManager.GetString("TemplateArgumentHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Template is malformed. The following parameter names are invalid: {0}.. /// @@ -1215,7 +1215,7 @@ public static string TemplateMalformedDueToBadParameters { return ResourceManager.GetString("TemplateMalformedDueToBadParameters", resourceCulture); } } - + /// /// Looks up a localized string similar to The following templates partially match the input. Be more specific with the template name and/or language.. /// @@ -1224,7 +1224,7 @@ public static string TemplateMultiplePartialNameMatches { return ResourceManager.GetString("TemplateMultiplePartialNameMatches", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} matches the specified name, but has been excluded by the --type parameter. Remove or change the --type parameter to use that template.. /// @@ -1233,7 +1233,7 @@ public static string TemplateNotValidGivenTheSpecifiedFilter { return ResourceManager.GetString("TemplateNotValidGivenTheSpecifiedFilter", resourceCulture); } } - + /// /// Looks up a localized string similar to Templates. /// @@ -1242,7 +1242,7 @@ public static string Templates { return ResourceManager.GetString("Templates", resourceCulture); } } - + /// /// Looks up a localized string similar to This template contains technologies from parties other than Microsoft, see {0} for details.. /// @@ -1251,7 +1251,7 @@ public static string ThirdPartyNotices { return ResourceManager.GetString("ThirdPartyNotices", resourceCulture); } } - + /// /// Looks up a localized string similar to Type. /// @@ -1260,7 +1260,7 @@ public static string Type { return ResourceManager.GetString("Type", resourceCulture); } } - + /// /// Looks up a localized string similar to Uninstalls a source or a template pack.. /// @@ -1269,7 +1269,7 @@ public static string UninstallHelp { return ResourceManager.GetString("UninstallHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Unknown Change. /// @@ -1278,7 +1278,7 @@ public static string UnknownChangeKind { return ResourceManager.GetString("UnknownChangeKind", resourceCulture); } } - + /// /// Looks up a localized string similar to An update for {0} is available.... /// @@ -1287,7 +1287,7 @@ public static string UpdateAvailable { return ResourceManager.GetString("UpdateAvailable", resourceCulture); } } - + /// /// Looks up a localized string similar to Update matching templates.. /// @@ -1296,7 +1296,7 @@ public static string UpdateHelp { return ResourceManager.GetString("UpdateHelp", resourceCulture); } } - + /// /// Looks up a localized string similar to Value specified for valueless parameter: {0}.. /// @@ -1305,7 +1305,7 @@ public static string ValueSpecifiedForValuelessParameter { return ResourceManager.GetString("ValueSpecifiedForValuelessParameter", resourceCulture); } } - + /// /// Looks up a localized string similar to Specify if post action scripts should run.. /// @@ -1314,7 +1314,7 @@ public static string WhetherToAllowScriptsToRun { return ResourceManager.GetString("WhetherToAllowScriptsToRun", resourceCulture); } } - + /// /// Looks up a localized string similar to About to create: . /// @@ -1323,5 +1323,14 @@ public static string WillCreateTemplate { return ResourceManager.GetString("WillCreateTemplate", resourceCulture); } } + + /// + /// Unable to apply permissions {0} to "{1}".. + /// + public static string UnableToSetPermissions { + get { + return ResourceManager.GetString("UnableToSetPermissions", resourceCulture); + } + } } } diff --git a/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx b/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx index 943f94cab10..965875123de 100644 --- a/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx +++ b/src/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx @@ -1,549 +1,552 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Alias - - - Successfully created alias named '{0}' with value '{1}' - - - Unable to determine the desired template from the input template name: {0}. - - - The specified extra args file does not exist: {0}. - - - Extra args file {0} is not formatted properly. - - - Assembly - - - Author: {0} - - - Invalid format for input locale: "{0}". Example valid formats: [en] [en-US]. - - - Could not install "{0}". - - - Change - - - Checking for updates for {0}... - - - Template Instantiation Commands for .NET Core CLI - - - Configured Value: {0} - - - Continue? - - - Creates an alias for the specified template. - - - Indicates whether to create a directory for the generated content. - - - Template "{0}" could not be created. -{1} - - - The template "{0}" was created successfully. - - - Current configuration: - - - Default: {0} - - - Delete - - - Description: {0} - - - Creating this template will make changes to existing files: - - - Displays help for this command. - - - Specifies a file containing additional parameters. - - - Factory - - - Forces content to be generated even if it would change existing files. - - - Generators - - - {0} cannot be created in the target location. - - - Getting ready... - - - Id - - - "{0}" could not be installed. -{1}. - - - Installs a source or a template pack. - - - Installing updates... - - - "{0}" was installed successfully. - - - Invalid input switch: - - - {0} {1} - '{1}' is not a valid value for {0} ({2}). - - - Error: Invalid values for parameter(s) {0} for template {1}. - - - Error: Invalid parameter(s): - - - Language - - - Specifies the language of the template to create. - - - Lists templates containing the specified name. If no name is specified, lists all templates. - - - The locale to use. - - - Mandatory parameter {0} missing for template {1}. - - - Mount Point Factories - - - Mount Points - - - Template name is the only allowed argument. Invalid argument: {0}. - - - Multiple values specified for single value parameter: {0}. - - - The name for the output being created. If no name is specified, the name of the current directory is used. - - - (No Items) - - - (No Parameters) - - - No templates matched the input template name: {0}. - - - No updates were found. - - - Options: - - - Option variant {0} for canonical {1} was already defined for canonical {2}. - - - Location to place the generated output. - - - Overwrite - - - Parameter {0} ({1}) must be given a value. - - - Parameter names must start with -- or -. - - - Parameter name {0} cannot be used for multiple purposes. - - - Parameter {0} was specified multiple times, including with the flag {1}. - - - Parent - - - Doesn't output any status information. - - - Rerun the command and pass --force to accept and create. - - - Run dotnet {0} --help for usage information. - - - Short Name - - - Shows all templates. - - - Filters templates based on available types. Predefined values are "project", "item" or "other". - - - Tags - - - The template to instantiate. - - - Template is malformed. The following parameter names are invalid: {0}. - - - The following templates partially match the input. Be more specific with the template name and/or language. - - - {0} matches the specified name, but has been excluded by the --type parameter. Remove or change the --type parameter to use that template. - - - Templates - - - Type - - - Unknown Change - - - An update for {0} is available... - - - Update matching templates. - - - Value specified for valueless parameter: {0}. - - - About to create: - - - No Primary Outputs to restore. - - - Command failed. - - - Output from command: -{0} - - - Command succeeded. - - - Restore failed. - - - Restore succeeded. - - - Running 'dotnet restore' on {0}... - - - Running command '{0}'... - - - Invalid input "{0}". Please enter one of (Y|N). - - - Template is configured to run the following action: - - - Do you want to run this action (Y|N)? - - - Processing post-creation actions... - - - Specify if post action scripts should run. - - - Do not allow scripts to run - - - Ask before running each script - - - Allow scripts to run - - - Actual command: {0} - - - Description: {0} - - - Manual instructions: {0} - - - This template contains technologies from parties other than Microsoft, see {0} for details. - - - Uninstalls a source or a template pack. - - - Could not find something to uninstall called '{0}'. - - - {0} {1} - The default value '{1}' is not a valid value for {0}. - - - Failed to add reference {0} to project file {1} - - - No references configured to be added to project. - - - Adding a project reference. Running dotnet add {0} reference {1} - - - Successfully added - reference: {0} - to project file: {1} - - - Post action failed. - - - Adding a package reference. Running dotnet add {0} package {1} - - - Add reference action is not configured correctly in the template. - - - Adding reference type {0} is not supported. - - - Adding a package reference. Running dotnet add {0} package {1} --version {2} - - - Unable to determine which project file to add the reference to. - - - Project files found: - - - Creates, updates, or deletes the named alias. The alias value is the remainder of the command. If extra args files are specified, the alias value includes their expansions. - - - Alias Name - - - Alias Value - - - Displays the value of the named alias, or all aliases if no name is specified. - - - Alias names can only contain letters, numbers, underscores, and periods. - - - Alias '{0}' is a template short name, and therefore cannot be aliased. - - - After expanding aliases, the command is: - dotnet {0} - - - Command is invalid after expanding aliases. - - - Error expanding aliases on input params. - - - After expanding the extra args files, the command is: - dotnet {0} - - - Alias not created. It would have created an alias cycle, resulting in infinite expansion. - - - Alias not created. The input was invalid. - - - Successfully removed alias named '{0}' whose value was '{1}'. - - - All Aliases: - - - Unknown alias name '{0}'. -Run 'dotnet {1} --show-aliases' with no args to show all aliases. - - - Successfully updated alias named '{0}' to value '{1}'. - - - First argument of an alias value must begin with a letter or digit. - - - Unable to remove alias '{0}'. It did not exist. - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - - - Failed to add project(s) {0} to solution file {1} - - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - - - Adding project reference(s) to solution file. Running dotnet sln {0} add {1} - - - Successfully added - project(s): {0} - to solution file: {1} - - - Unable to determine which solution file to add the reference to. - - - Couldn't find item to install: "{0}". - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Alias + + + Successfully created alias named '{0}' with value '{1}' + + + Unable to determine the desired template from the input template name: {0}. + + + The specified extra args file does not exist: {0}. + + + Extra args file {0} is not formatted properly. + + + Assembly + + + Author: {0} + + + Invalid format for input locale: "{0}". Example valid formats: [en] [en-US]. + + + Could not install "{0}". + + + Change + + + Checking for updates for {0}... + + + Template Instantiation Commands for .NET Core CLI + + + Configured Value: {0} + + + Continue? + + + Creates an alias for the specified template. + + + Indicates whether to create a directory for the generated content. + + + Template "{0}" could not be created. +{1} + + + The template "{0}" was created successfully. + + + Current configuration: + + + Default: {0} + + + Delete + + + Description: {0} + + + Creating this template will make changes to existing files: + + + Displays help for this command. + + + Specifies a file containing additional parameters. + + + Factory + + + Forces content to be generated even if it would change existing files. + + + Generators + + + {0} cannot be created in the target location. + + + Getting ready... + + + Id + + + "{0}" could not be installed. +{1}. + + + Installs a source or a template pack. + + + Installing updates... + + + "{0}" was installed successfully. + + + Invalid input switch: + + + {0} {1} + '{1}' is not a valid value for {0} ({2}). + + + Error: Invalid values for parameter(s) {0} for template {1}. + + + Error: Invalid parameter(s): + + + Language + + + Specifies the language of the template to create. + + + Lists templates containing the specified name. If no name is specified, lists all templates. + + + The locale to use. + + + Mandatory parameter {0} missing for template {1}. + + + Mount Point Factories + + + Mount Points + + + Template name is the only allowed argument. Invalid argument: {0}. + + + Multiple values specified for single value parameter: {0}. + + + The name for the output being created. If no name is specified, the name of the current directory is used. + + + (No Items) + + + (No Parameters) + + + No templates matched the input template name: {0}. + + + No updates were found. + + + Options: + + + Option variant {0} for canonical {1} was already defined for canonical {2}. + + + Location to place the generated output. + + + Overwrite + + + Parameter {0} ({1}) must be given a value. + + + Parameter names must start with -- or -. + + + Parameter name {0} cannot be used for multiple purposes. + + + Parameter {0} was specified multiple times, including with the flag {1}. + + + Parent + + + Doesn't output any status information. + + + Rerun the command and pass --force to accept and create. + + + Run dotnet {0} --help for usage information. + + + Short Name + + + Shows all templates. + + + Filters templates based on available types. Predefined values are "project", "item" or "other". + + + Tags + + + The template to instantiate. + + + Template is malformed. The following parameter names are invalid: {0}. + + + The following templates partially match the input. Be more specific with the template name and/or language. + + + {0} matches the specified name, but has been excluded by the --type parameter. Remove or change the --type parameter to use that template. + + + Templates + + + Type + + + Unknown Change + + + An update for {0} is available... + + + Update matching templates. + + + Value specified for valueless parameter: {0}. + + + About to create: + + + No Primary Outputs to restore. + + + Command failed. + + + Output from command: +{0} + + + Command succeeded. + + + Restore failed. + + + Restore succeeded. + + + Running 'dotnet restore' on {0}... + + + Running command '{0}'... + + + Invalid input "{0}". Please enter one of (Y|N). + + + Template is configured to run the following action: + + + Do you want to run this action (Y|N)? + + + Processing post-creation actions... + + + Specify if post action scripts should run. + + + Do not allow scripts to run + + + Ask before running each script + + + Allow scripts to run + + + Actual command: {0} + + + Description: {0} + + + Manual instructions: {0} + + + This template contains technologies from parties other than Microsoft, see {0} for details. + + + Uninstalls a source or a template pack. + + + Could not find something to uninstall called '{0}'. + + + {0} {1} + The default value '{1}' is not a valid value for {0}. + + + Failed to add reference {0} to project file {1} + + + No references configured to be added to project. + + + Adding a project reference. Running dotnet add {0} reference {1} + + + Successfully added + reference: {0} + to project file: {1} + + + Post action failed. + + + Adding a package reference. Running dotnet add {0} package {1} + + + Add reference action is not configured correctly in the template. + + + Adding reference type {0} is not supported. + + + Adding a package reference. Running dotnet add {0} package {1} --version {2} + + + Unable to determine which project file to add the reference to. + + + Project files found: + + + Creates, updates, or deletes the named alias. The alias value is the remainder of the command. If extra args files are specified, the alias value includes their expansions. + + + Alias Name + + + Alias Value + + + Displays the value of the named alias, or all aliases if no name is specified. + + + Alias names can only contain letters, numbers, underscores, and periods. + + + Alias '{0}' is a template short name, and therefore cannot be aliased. + + + After expanding aliases, the command is: + dotnet {0} + + + Command is invalid after expanding aliases. + + + Error expanding aliases on input params. + + + After expanding the extra args files, the command is: + dotnet {0} + + + Alias not created. It would have created an alias cycle, resulting in infinite expansion. + + + Alias not created. The input was invalid. + + + Successfully removed alias named '{0}' whose value was '{1}'. + + + All Aliases: + + + Unknown alias name '{0}'. +Run 'dotnet {1} --show-aliases' with no args to show all aliases. + + + Successfully updated alias named '{0}' to value '{1}'. + + + First argument of an alias value must begin with a letter or digit. + + + Unable to remove alias '{0}'. It did not exist. + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + + + Failed to add project(s) {0} to solution file {1} + + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + + + Adding project reference(s) to solution file. Running dotnet sln {0} add {1} + + + Successfully added + project(s): {0} + to solution file: {1} + + + Unable to determine which solution file to add the reference to. + + + Couldn't find item to install: "{0}". + + + Unable to apply permissions {0} to "{1}". + + diff --git a/src/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs b/src/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs new file mode 100644 index 00000000000..2ac303b2a4f --- /dev/null +++ b/src/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using Microsoft.TemplateEngine.Abstractions; +using Newtonsoft.Json.Linq; + +namespace Microsoft.TemplateEngine.Cli.PostActionProcessors +{ + public class ChmodPostActionProcessor : IPostActionProcessor + { + private static readonly Guid ActionProcessorId = new Guid("cb9a6cf3-4f5c-4860-b9d2-03a574959774"); + + public Guid Id => ActionProcessorId; + + public ChmodPostActionProcessor() + { + } + + public bool Process(IEngineEnvironmentSettings environment, IPostAction actionConfig, ICreationResult templateCreationResult, string outputBasePath) + { + bool allSucceeded = true; + foreach (KeyValuePair entry in actionConfig.Args) + { + string[] values; + try + { + JArray valueArray = JArray.Parse(entry.Value); + values = new string[valueArray.Count]; + + for (int i = 0; i < valueArray.Count; ++i) + { + values[i] = valueArray[i].ToString(); + } + } + catch + { + values = new[] {entry.Value}; + } + + foreach (string file in values) + { + System.Diagnostics.Process commandResult = System.Diagnostics.Process.Start(new ProcessStartInfo + { + RedirectStandardError = false, + RedirectStandardOutput = false, + UseShellExecute = true, + CreateNoWindow = false, + WorkingDirectory = outputBasePath, + FileName = "chmod", + Arguments = $"{entry.Key} {file}" + }); + + commandResult.WaitForExit(); + + if (commandResult.ExitCode != 0) + { + environment.Host.LogMessage(string.Format(LocalizableStrings.UnableToSetPermissions, entry.Key, file)); + allSucceeded = false; + } + } + } + + return allSucceeded; + } + } +}