Skip to content

chore: remove windows elevation check #1384

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

Merged
merged 2 commits into from
Jul 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions addon/ng2/commands/build.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 1 addition & 3 deletions addon/ng2/commands/github-pages-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions addon/ng2/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});
},

Expand Down
23 changes: 4 additions & 19 deletions addon/ng2/commands/test.js
Original file line number Diff line number Diff line change
@@ -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'] },
Expand All @@ -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);
}
});

Expand Down