@@ -44,7 +44,14 @@ export class ProtractorBuilder implements Builder<ProtractorBuilderOptions> {
44
44
const options = builderConfig . options ;
45
45
const root = this . context . workspace . root ;
46
46
const projectRoot = resolve ( root , builderConfig . root ) ;
47
- // const projectSystemRoot = getSystemPath(projectRoot);
47
+
48
+ // ensure that either one of this option is used
49
+ if ( options . devServerTarget && options . baseUrl ) {
50
+ throw new Error ( tags . stripIndents `
51
+ The 'baseUrl' option cannot be used with 'devServerTarget'.
52
+ When present, 'devServerTarget' will be used to automatically setup 'baseUrl' for Protractor.
53
+ ` ) ;
54
+ }
48
55
49
56
// TODO: verify using of(null) to kickstart things is a pattern.
50
57
return of ( null ) . pipe (
@@ -81,7 +88,7 @@ export class ProtractorBuilder implements Builder<ProtractorBuilderOptions> {
81
88
}
82
89
83
90
// Compute baseUrl from devServerOptions.
84
- if ( options . devServerTarget && builderConfig . options . publicHost ) {
91
+ if ( builderConfig . options . publicHost ) {
85
92
let publicHost = builderConfig . options . publicHost ;
86
93
if ( ! / ^ \w + : \/ \/ / . test ( publicHost ) ) {
87
94
publicHost = `${ builderConfig . options . ssl
@@ -90,7 +97,7 @@ export class ProtractorBuilder implements Builder<ProtractorBuilderOptions> {
90
97
}
91
98
const clientUrl = url . parse ( publicHost ) ;
92
99
baseUrl = url . format ( clientUrl ) ;
93
- } else if ( options . devServerTarget ) {
100
+ } else {
94
101
const result : DevServerResult | undefined = buildEvent . result ;
95
102
96
103
baseUrl = url . format ( {
0 commit comments