Questions tagged [lockfile]

106 questions
2386
votes
14 answers

Do I commit the package-lock.json file created by npm 5?

npm 5 was released today and one of the new features include deterministic installs with the creation of a package-lock.json file. Is this file supposed to be kept in source control? I'm assuming it's similar to yarn.lock and composer.lock, both of…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
383
votes
23 answers

Waiting for another flutter command to release the startup lock

When I run my flutter application it show Waiting for another flutter command to release the startup lock this messages and not proceed further.
Viren V Varasadiya
  • 25,492
  • 9
  • 45
  • 61
211
votes
43 answers

Quick-and-dirty way to ensure only one instance of a shell script is running at a time

What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?
raldi
  • 21,344
  • 33
  • 76
  • 86
134
votes
14 answers

What is the best way to ensure only one instance of a Bash script is running?

What is the simplest/best way to ensure only one instance of a given script is running - assuming it's Bash on Linux? At the moment I'm doing: ps -C script.name.sh > /dev/null 2>&1 || ./script.name.sh but it has several issues: it puts the check…
user80168
35
votes
1 answer

NPM lockfiles/shrinkwrap get random "dl" parameter tacked on to the "resolved" URL

Our company uses an Artifactory repository for storing internally-published packages and as a proxy for the NPM registry. Sometimes the resolved field in lockfiles/shrinkwrap files is as expected, containing URLs for our internal repository, but…
Jacob
  • 77,566
  • 24
  • 149
  • 228
29
votes
1 answer

Is 'lockfileVersion: 2' in package-lock.json from npm 7 compatible with older versions of npm?

I was wondering if the new lockfileVersion 2 was backwards compatable with older versions of NPM. Now since NPM 7 is released, a new package-lock.json file is regenerated to a different structure. From lockfileVersion 1 to 2. I would be guessing if…
Thaun_
  • 470
  • 1
  • 4
  • 10
28
votes
7 answers

Python: module for creating PID-based lockfile?

I'm writing a Python script that may or may not (depending on a bunch of things) run for a long time, and I'd like to make sure that multiple instances (started via cron) don't step on each others toes. The logical way to do this seems to be a…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
19
votes
1 answer

Server-side custom git merge driver on GitHub/Azure Repos

I have a custom merge driver for git that helps merge lockfiles in a large monorepo shared by hundreds of engineers. Because lockfiles churn quite frequently, it's not uncommon for these files to result in merge conflicts while a PR is being…
Sachin Joseph
  • 18,928
  • 4
  • 42
  • 62
12
votes
4 answers

Why is my program creating empty .lck files?

I am trying to use Java Logger. I get my logger file (name.log) with the content, it works and I also get an empty name.log.lck file. Why does this file appear, what program is creating them and how I can remove this behavior?
Roman
  • 124,451
  • 167
  • 349
  • 456
11
votes
1 answer

npm equivalent of yarn install --check-files (or yarn check)

Update for 2020 This question originally referred to the yarn check command, but the docs state that this is deprecated in v1, and removed in v2, and yarn install --check-files should be used instead. Unfortunately there is still, apparently, no…
davnicwil
  • 28,487
  • 16
  • 107
  • 123
10
votes
3 answers

Inconsistent dependency when i do terraform apply from plan -out=file

I am attempting to create new resources on GCP with a remote backend After doing terraform init plan -out=tfplan and then terraform apply tfplan I get the following error: Error: Inconsistent dependency lock file │ │ The following dependency…
Shay Pinchasi
  • 131
  • 1
  • 1
  • 6
10
votes
2 answers

Git: do not create index.lock for read-only operations

Is there a way to force git not to create index.lock for read-only operations like git status? I'm displaying the status of my working tree in tmux, being updated every couple of seconds. Basically I parse the output of git status --branch --ignored…
Michael Krupp
  • 2,042
  • 3
  • 19
  • 36
8
votes
2 answers

Implementing a portable file locking mechanism

I have implemented a file locking mechanism along the lines of the suggestion from the linux man page for "open", which states: Portable programs that want to perform atomic file locking using a lockfile, and need to avoid reliance on NFS support…
Nigel Scott
  • 643
  • 6
  • 12
7
votes
0 answers

Unable to install packages via renv::restore() ("R was unable to find one or more FORTRAN libraries during compilation.")

I've downloaded an old repo on a new laptop (running on MacOS Catalina) and attempted to run a R script. The repo has a renv lock file - meaning, I should be able to restore all dependencies as they were. But as I run the renv::restore() command,…
abtinsr
  • 71
  • 2
7
votes
3 answers

In Makefile, how to cleanup lockfile files?

In GNU Make 3.81, I need to remove a lockfile in the event of an error in any part of the toolchain. Is there a special target that will allow me to do this? Do I need to write a wrapper script? In the example below, I need unlock_id to happen if…
Jeff
  • 552
  • 1
  • 8
  • 16
1
2 3 4 5 6 7