Skip to content

impl: remove profileDir from shell #1583

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

Merged
merged 1 commit into from
Oct 24, 2023
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
6 changes: 0 additions & 6 deletions internal/impl/devbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ func (d *Devbox) Shell(ctx context.Context) error {
ctx, task := trace.NewTask(ctx, "devboxShell")
defer task.End()

profileDir, err := d.profilePath()
if err != nil {
return err
}

envs, err := d.ensurePackagesAreInstalledAndComputeEnv(ctx)
if err != nil {
return err
Expand All @@ -193,7 +188,6 @@ func (d *Devbox) Shell(ctx context.Context) error {

opts := []ShellOption{
WithHooksFilePath(shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename)),
WithProfile(profileDir),
WithHistoryFile(filepath.Join(d.projectDir, shellHistoryFile)),
WithProjectDir(d.projectDir),
WithEnvVariables(envs),
Expand Down
11 changes: 1 addition & 10 deletions internal/impl/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ type DevboxShell struct {
userShellrcPath string

hooksFilePath string

// profileDir is the absolute path to the directory storing the nix-profile
profileDir string
historyFile string
historyFile string

// shellStartTime is the unix timestamp for when the command was invoked
shellStartTime time.Time
Expand Down Expand Up @@ -174,12 +171,6 @@ func initShellBinaryFields(path string) *DevboxShell {
return shell
}

func WithProfile(profileDir string) ShellOption {
return func(s *DevboxShell) {
s.profileDir = profileDir
}
}

func WithHistoryFile(historyFile string) ShellOption {
return func(s *DevboxShell) {
s.historyFile = historyFile
Expand Down
1 change: 0 additions & 1 deletion internal/impl/shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func testWriteDevboxShellrc(t *testing.T, testdirs []string) {
projectDir: "path/to/projectDir",
userShellrcPath: test.shellrcPath,
hooksFilePath: test.hooksFilePath,
profileDir: "./.devbox/profile",
}
gotPath, err := s.writeDevboxShellrc()
if err != nil {
Expand Down