Skip to content

Commit d255c78

Browse files
committed
chore: remove windows elevation check
1 parent 18318a2 commit d255c78

File tree

4 files changed

+8
-34
lines changed

4 files changed

+8
-34
lines changed

addon/ng2/commands/build.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
const Command = require('ember-cli/lib/models/command');
2-
const win = require('ember-cli/lib/utilities/windows-admin');
3-
4-
// const Build = require('../tasks/build');
5-
// const BuildWatch = require('../tasks/build-watch');
6-
7-
var WebpackBuild = require('../tasks/build-webpack');
8-
var WebpackBuildWatch = require('../tasks/build-webpack-watch');
2+
const WebpackBuild = require('../tasks/build-webpack');
3+
const WebpackBuildWatch = require('../tasks/build-webpack-watch');
94

105
interface BuildOptions {
116
environment?: string;

addon/ng2/commands/github-pages-deploy.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as fs from 'fs';
77
import * as fse from 'fs-extra';
88
import * as path from 'path';
99
import * as BuildTask from 'ember-cli/lib/tasks/build';
10-
import * as win from 'ember-cli/lib/utilities/windows-admin';
1110
import * as CreateGithubRepo from '../tasks/create-github-repo';
1211

1312
const fsReadFile = Promise.denodeify(fs.readFile);
@@ -117,8 +116,7 @@ module.exports = Command.extend({
117116

118117
function build() {
119118
if (options.skipBuild) return Promise.resolve();
120-
return win.checkWindowsElevation(ui)
121-
.then(() => buildTask.run(buildOptions));
119+
return buildTask.run(buildOptions);
122120
}
123121

124122
function saveStartingBranchName() {

addon/ng2/commands/serve.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ const Command = require('ember-cli/lib/models/command');
33
const Promise = require('ember-cli/lib/ext/promise');
44
const SilentError = require('silent-error');
55
const PortFinder = require('portfinder');
6-
const win = require('ember-cli/lib/utilities/windows-admin');
76
const EOL = require('os').EOL;
87

9-
108
PortFinder.basePort = 49152;
119

1210
const getPort = Promise.denodeify(PortFinder.getPort);
@@ -81,9 +79,7 @@ module.exports = Command.extend({
8179
project: this.project,
8280
});
8381

84-
return win.checkWindowsElevation(this.ui).then(function() {
85-
return serve.run(commandOptions);
86-
});
82+
return serve.run(commandOptions);
8783
});
8884
},
8985

addon/ng2/commands/test.js

+4-19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
'use strict';
22

3-
var TestCommand = require('ember-cli/lib/commands/test');
4-
var win = require('ember-cli/lib/utilities/windows-admin');
5-
3+
const TestCommand = require('ember-cli/lib/commands/test');
64
const config = require('../models/config');
75
const TestTask = require('../tasks/test');
86

9-
107
module.exports = TestCommand.extend({
118
availableOptions: [
129
{ name: 'watch', type: Boolean, default: true, aliases: ['w'] },
@@ -27,23 +24,11 @@ module.exports = TestCommand.extend({
2724
project: this.project
2825
});
2926

30-
if (commandOptions.watch) {
31-
return win.checkWindowsElevation(this.ui)
32-
.then(
33-
() => {
34-
},
35-
() => {
36-
/* handle build error to allow watch mode to start */
37-
})
38-
.then(() => testTask.run(commandOptions));
39-
} else {
27+
if (!commandOptions.watch) {
4028
// if not watching ensure karma is doing a single run
4129
commandOptions.singleRun = true;
42-
return win.checkWindowsElevation(this.ui)
43-
.then(() => {
44-
return testTask.run(commandOptions);
45-
});
46-
}
30+
}
31+
return testTask.run(commandOptions);
4732
}
4833
});
4934

0 commit comments

Comments
 (0)