Skip to content

Commit

Permalink
Go: fix Windows installation
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed May 6, 2024
1 parent 5b184c1 commit 73df4fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor

# this requires developer mode, but is required to have pack installer functioning
common:windows --windows_enable_symlinks --enable_runfiles
startup --windows_enable_symlinks
common --enable_runfiles

common --registry=file:///%workspace%/misc/bazel/registry
common --registry=https://bcr.bazel.build
Expand Down
8 changes: 6 additions & 2 deletions go/create_extractor_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@

from go._extractor_pack_install_script import main

if os.environ['REPO_NAME'] == 'codeql~':
build_dir = workspace_dir / 'go' / 'build'

if not build_dir.exists():
# we probably are in the internal repo
workspace_dir /= 'ql'
build_dir = workspace_dir / 'go' / 'build'

dest_dir = workspace_dir / 'go' / 'build' / 'codeql-extractor-pack'
dest_dir = build_dir / 'codeql-extractor-pack'
shutil.rmtree(dest_dir, ignore_errors=True)
os.environ['DESTDIR'] = str(dest_dir)
main(sys.argv)

0 comments on commit 73df4fa

Please sign in to comment.