Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Codespell Development Environment",
"image": "mcr.microsoft.com/devcontainers/python:1-3",
"customizations": {
"vscode": {
"extensions": [
"github.vscode-github-actions",
Comment thread
korverdev marked this conversation as resolved.
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
"postCreateCommand": "bash .devcontainer/post_create.sh"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@korverdev Could you change above line to:

 "postCreateCommand": ["bash", ".devcontainer/post_create.sh"]

This will avoid spawning an additional shell according to the Development Containers specification:

Formatting string vs. array properties

The format of certain properties will vary depending on the involvement of a shell.

postCreateCommand, postStartCommand, postAttachCommand, and initializeCommand all have 3 types:

  • Array: Passed to the OS for execution without going through a shell
  • String: Goes through a shell (it needs to be parsed into command and arguments)
  • Object: All lifecycle scripts have been extended to support object types to allow for parallel execution

}
12 changes: 12 additions & 0 deletions .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

sudo apt-get update
sudo apt-get install -y libaspell-dev
Comment thread
DimitriPapadopoulos marked this conversation as resolved.

pip install --upgrade \
aspell-python-py3 \
pip \
setuptools \
setuptools_scm \
wheel
pip install -e '.[dev]'
Comment thread
DimitriPapadopoulos marked this conversation as resolved.