MLS - Setting the right url to install sqlmlutils from for MAC and Linux (#9962)

* Setting the right url to install sqlmlutils from for MAC and Linux
This commit is contained in:
Leila Lali
2020-04-30 12:09:05 -07:00
committed by GitHub
parent 0999060827
commit af36d79c53
4 changed files with 23 additions and 5 deletions

View File

@@ -67,7 +67,6 @@ export class PackageManager {
*/
public async managePackages(): Promise<void> {
try {
await this.enableExternalScript();
// Only execute the command if there's a valid connection with ml configuration enabled
//
@@ -129,7 +128,8 @@ export class PackageManager {
}
await utils.createFolder(utils.getRPackagesFolderPath(this._rootFolder));
await Promise.all(this._config.requiredSqlRPackages.map(x => this.installRPackage(x)));
const packages = this._config.requiredSqlRPackages.filter(p => !p.platform || p.platform === process.platform);
await Promise.all(packages.map(x => this.installRPackage(x)));
}
/**

View File

@@ -75,7 +75,7 @@ export class SqlRPackageManageProvider extends SqlPackageManageProviderBase impl
let scripts: string[] = [
'formals(quit)$save <- formals(q)$save <- "no"',
'library(sqlmlutils)',
`connection <- connectionInfo(${connectionParts})`,
`connection <- connectionInfo(driver= "ODBC Driver 17 for SQL Server", ${connectionParts})`,
`r = getOption("repos")`,
`r["CRAN"] = "${this._config.rPackagesRepository}"`,
`options(repos = r)`,