mirror of
https://github.com/Ellpeck/Contentless.git
synced 2024-11-26 08:58:33 +01:00
fixed argument oder being incorrect corrupting project files
This commit is contained in:
parent
5897609dd2
commit
280d92edf3
1 changed files with 6 additions and 2 deletions
|
@ -20,8 +20,8 @@ public static class Program {
|
||||||
}
|
}
|
||||||
|
|
||||||
var contentFile = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[0])));
|
var contentFile = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[0])));
|
||||||
if (!contentFile.Exists) {
|
if (!contentFile.Exists || contentFile.Extension != ".mgcb") {
|
||||||
Console.Error.WriteLine($"Unable to find content file {contentFile}");
|
Console.Error.WriteLine($"Unable to find valid content file at {contentFile}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,10 @@ public static class Program {
|
||||||
if (config.References.Length > 0) {
|
if (config.References.Length > 0) {
|
||||||
if (args.Length > 1) {
|
if (args.Length > 1) {
|
||||||
var csprojFullPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[1]));
|
var csprojFullPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[1]));
|
||||||
|
if (!File.Exists(csprojFullPath) || Path.GetExtension(csprojFullPath) != ".csproj") {
|
||||||
|
Console.Error.WriteLine($"Unable to find valid project file at {contentFile}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Program.ExtractVersions(csprojFullPath, referencesVersions);
|
Program.ExtractVersions(csprojFullPath, referencesVersions);
|
||||||
var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath));
|
var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath));
|
||||||
packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings);
|
packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings);
|
||||||
|
|
Loading…
Reference in a new issue