diff --git a/addon/ng2/commands/build.ts b/addon/ng2/commands/build.ts index 9b99d6587ff9..1fe80828d0af 100644 --- a/addon/ng2/commands/build.ts +++ b/addon/ng2/commands/build.ts @@ -1,11 +1,6 @@ const Command = require('ember-cli/lib/models/command'); -const win = require('ember-cli/lib/utilities/windows-admin'); - -// const Build = require('../tasks/build'); -// const BuildWatch = require('../tasks/build-watch'); - -var WebpackBuild = require('../tasks/build-webpack'); -var WebpackBuildWatch = require('../tasks/build-webpack-watch'); +const WebpackBuild = require('../tasks/build-webpack'); +const WebpackBuildWatch = require('../tasks/build-webpack-watch'); interface BuildOptions { environment?: string; diff --git a/addon/ng2/commands/github-pages-deploy.ts b/addon/ng2/commands/github-pages-deploy.ts index 8ac1478c1e6f..5dae59a40af6 100644 --- a/addon/ng2/commands/github-pages-deploy.ts +++ b/addon/ng2/commands/github-pages-deploy.ts @@ -7,7 +7,6 @@ import * as fs from 'fs'; import * as fse from 'fs-extra'; import * as path from 'path'; import * as BuildTask from 'ember-cli/lib/tasks/build'; -import * as win from 'ember-cli/lib/utilities/windows-admin'; import * as CreateGithubRepo from '../tasks/create-github-repo'; const fsReadFile = Promise.denodeify(fs.readFile); @@ -117,8 +116,7 @@ module.exports = Command.extend({ function build() { if (options.skipBuild) return Promise.resolve(); - return win.checkWindowsElevation(ui) - .then(() => buildTask.run(buildOptions)); + return buildTask.run(buildOptions); } function saveStartingBranchName() { diff --git a/addon/ng2/commands/serve.ts b/addon/ng2/commands/serve.ts index dd86072e6025..396e167a56ce 100644 --- a/addon/ng2/commands/serve.ts +++ b/addon/ng2/commands/serve.ts @@ -3,10 +3,8 @@ const Command = require('ember-cli/lib/models/command'); const Promise = require('ember-cli/lib/ext/promise'); const SilentError = require('silent-error'); const PortFinder = require('portfinder'); -const win = require('ember-cli/lib/utilities/windows-admin'); const EOL = require('os').EOL; - PortFinder.basePort = 49152; const getPort = Promise.denodeify(PortFinder.getPort); @@ -81,9 +79,7 @@ module.exports = Command.extend({ project: this.project, }); - return win.checkWindowsElevation(this.ui).then(function() { - return serve.run(commandOptions); - }); + return serve.run(commandOptions); }); }, diff --git a/addon/ng2/commands/test.js b/addon/ng2/commands/test.js index c90bb83165d1..e94af33be298 100644 --- a/addon/ng2/commands/test.js +++ b/addon/ng2/commands/test.js @@ -1,12 +1,9 @@ 'use strict'; -var TestCommand = require('ember-cli/lib/commands/test'); -var win = require('ember-cli/lib/utilities/windows-admin'); - +const TestCommand = require('ember-cli/lib/commands/test'); const config = require('../models/config'); const TestTask = require('../tasks/test'); - module.exports = TestCommand.extend({ availableOptions: [ { name: 'watch', type: Boolean, default: true, aliases: ['w'] }, @@ -27,23 +24,11 @@ module.exports = TestCommand.extend({ project: this.project }); - if (commandOptions.watch) { - return win.checkWindowsElevation(this.ui) - .then( - () => { - }, - () => { - /* handle build error to allow watch mode to start */ - }) - .then(() => testTask.run(commandOptions)); - } else { + if (!commandOptions.watch) { // if not watching ensure karma is doing a single run commandOptions.singleRun = true; - return win.checkWindowsElevation(this.ui) - .then(() => { - return testTask.run(commandOptions); - }); - } + } + return testTask.run(commandOptions); } });