Skip to content
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

bin/xbps-dgraph: print usage if package is not given #616

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 7 additions & 5 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ jobs:
contents: read
security-events: write
container:
image: ghcr.io/void-linux/void-glibc-full:20230830r1
image: ghcr.io/void-linux/void-glibc-full:20240526R1
steps:
- name: Prepare container
run: |
xbps-install -Syu || xbps-install -yu xbps
xbps-install -Syu xbps
xbps-install -yu
# node-based actions require libstdc++.so.6
# codeql runs some bash scripts
xbps-install -Sy \
libstdc++ git \
libstdc++ bash git \
gcc make pkg-config zlib-devel openssl-devel libarchive-devel
- name: Checkout repository
uses: actions/checkout@v3
- run: git config --global --add safe.directory $(pwd)
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: cpp
config-file: ./.github/codeql/codeql-config.yaml
Expand All @@ -43,6 +45,6 @@ jobs:
./configure
make -j
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
4 changes: 4 additions & 0 deletions bin/xbps-dgraph/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,10 @@ main(int argc, char **argv)
/* NOTREACHED */
}
pkg = *argv;
if (!pkg) {
usage(true);
/* NOTREACHED */
}

/* Initialize libxbps */
memset(&xh, 0, sizeof(xh));
Expand Down
Loading