Skip to content

Commit

Permalink
build.js: prefer startsWith over regex with a caret
Browse files Browse the repository at this point in the history
Found by eslint-plugin-unicorn.
  • Loading branch information
jelly authored and martinpitt committed Sep 25, 2024
1 parent 8809e37 commit 5f285c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ function watch_dirs(dir, on_change) {
const callback = (ev, dir, fname) => {
// only listen for "change" events, as renames are noisy
// ignore hidden files and the "4913" temporary file created by vim
const isHidden = /^\./.test(fname);
if (ev !== "change" || isHidden || fname === "4913")
if (ev !== "change" || fname.startsWith('.') || fname === "4913")
return;
on_change(path.join(dir, fname));
};
Expand Down

2 comments on commit 5f285c7

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your Packit configuration the settings of the @cockpit/cockpit-preview Copr project would need to be updated as follows:

field old value new value
bootstrap off default

Packit was unable to update the settings above as it is missing admin permissions on the @cockpit/cockpit-preview Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the @cockpit/cockpit-preview Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your Packit configuration the settings of the @cockpit/cockpit-preview Copr project would need to be updated as follows:

field old value new value
bootstrap off default

Packit was unable to update the settings above as it is missing admin permissions on the @cockpit/cockpit-preview Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the @cockpit/cockpit-preview Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

Please sign in to comment.