Skip to content
Closed
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
8 changes: 4 additions & 4 deletions packages/bazel/src/builders/bazel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/// <reference types='node'/>

import {fork} from 'child_process';
import {spawn} from 'child_process';
import {copyFileSync, existsSync, readdirSync, statSync, unlinkSync} from 'fs';
import {dirname, join, normalize} from 'path';

Expand All @@ -24,7 +24,7 @@ export function runBazel(
projectDir = normalize(projectDir);
binary = normalize(binary);
return new Promise((resolve, reject) => {
const buildProcess = fork(binary, [command, workspaceTarget, ...flags], {
const buildProcess = spawn(binary, [command, workspaceTarget, ...flags], {
cwd: projectDir,
stdio: 'inherit',
});
Expand All @@ -51,12 +51,12 @@ export function runBazel(
*/
export function checkInstallation(name: Executable, projectDir: string): string {
projectDir = normalize(projectDir);
const packageName = `@bazel/${name}/package.json`;
const packageName = `@bazel/${name}`;
try {
const bazelPath = require.resolve(packageName, {
paths: [projectDir],
});
return dirname(bazelPath);
return require(bazelPath).getNativeBinary();
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
throw new Error(
Expand Down
2 changes: 2 additions & 0 deletions packages/bazel/src/builders/files/__dot__bazelrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ build --incompatible_strict_action_env
run --incompatible_strict_action_env
test --incompatible_strict_action_env

build --incompatible_bzl_disallow_load_after_statement=false

test --test_output=errors

# Use the Angular 6 compiler
Expand Down
4 changes: 2 additions & 2 deletions packages/bazel/src/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function addDevDependenciesToPackageJson(options: Schema) {

const devDependencies: {[k: string]: string} = {
'@angular/bazel': angularCoreVersion,
'@bazel/bazel': '^0.24.0',
'@bazel/ibazel': '^0.10.1',
'@bazel/bazel': '^0.25.1',
'@bazel/ibazel': '^0.10.2',
'@bazel/karma': '0.27.12',
'@bazel/typescript': '0.27.12',
};
Expand Down