diff --git a/src/infrastructure/Netmash.Infrastructure.DatabaseMigration/Services/MigrationService.cs b/src/infrastructure/Netmash.Infrastructure.DatabaseMigration/Services/MigrationService.cs index 141af05..d046529 100644 --- a/src/infrastructure/Netmash.Infrastructure.DatabaseMigration/Services/MigrationService.cs +++ b/src/infrastructure/Netmash.Infrastructure.DatabaseMigration/Services/MigrationService.cs @@ -75,7 +75,11 @@ namespace Netmash.Infrastructure.DatabaseMigration.Services private ScriptPack[] GetScriptPacks() { - var scripts = Directory.GetDirectories(_configuration.ScriptsDirectory); + var scriptsPath = Directory.Exists(_configuration.ScriptsDirectory) ? + _configuration.ScriptsDirectory : + Path.Combine(Path.GetDirectoryName(Environment.ProcessPath), _configuration.ScriptsDirectory); + + var scripts = Directory.GetDirectories(scriptsPath); var packs = scripts.Select(z => new ScriptPack() { Path = z, Version = new Version(new DirectoryInfo(z).Name) }); return packs.ToArray();