-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlpackage path argument, dotnet tool sqlpackage #221
Conversation
…kwier/dotnet-tool
This PR is idle because it has been open for 14 days with no activity. |
src/AzureSqlActionHelper.ts
Outdated
core.debug('Getting location of SqlPackage'); | ||
|
||
let sqlPackagePathInstalledWithDotnetTool = await this._getSqlPackageExeInstalledDotnetTool(); | ||
core.debug(`SqlPackage (installed with dotnet tool) found at location: ${sqlPackagePathInstalledWithDotnetTool[0]}, version ${sqlPackagePathInstalledWithDotnetTool[1]}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really following this debug logic, and this could be confusing to customers - shouldn't we only say that sqlpackage was found if it was actually found (and instead, output a different message if it weren't found)?
src/AzureSqlActionHelper.ts
Outdated
core.debug('Getting location of SqlPackage'); | ||
|
||
let sqlPackagePathInstalledWithDotnetTool = await this._getSqlPackageExeInstalledDotnetTool(); | ||
core.debug(`SqlPackage (installed with dotnet tool) found at location: ${sqlPackagePathInstalledWithDotnetTool[0]}, version ${sqlPackagePathInstalledWithDotnetTool[1]}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is me being picky, but I much prefer an interface to be returned here instead of an array of a string + semver to prevent array lookups in various places
src/AzureSqlActionHelper.ts
Outdated
let globalDotnetToolsPath = path.join(process.env['USERPROFILE'] as string, '.dotnet', 'tools'); | ||
let sqlPackagePath = path.join(globalDotnetToolsPath, 'SqlPackage.exe'); | ||
if (fs.existsSync(sqlPackagePath)) { | ||
core.debug(`SqlPackage (installed with dotnet tool) found at location: ${sqlPackagePath}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there going to be double debug statements (due to debug statements also existing in _getSqlPackageExecutablePath)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that would have been too noisy - thanks - cleaned up and moved all positive case debug messages to the specific functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks so much for being receptive to comments/suggestions 😄!
3 changes lumped together in this PR (I let it get away from me):
sqlpackage-path
which overrides any sqlpackage location detection by the action except to check that it exists. (fixes Support SqlPackage.exe at a specific path #211)also fixes #180
future PR needed to remove SSMS-related logic as it hasn't installed sqlpackage.exe for quite some time